Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1268495pxk; Sat, 12 Sep 2020 18:27:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzk4c2uYGsh6RDWF1Ov+w5yvuZGkEfginPe7C03erownK2qW7Tbf0bD6ND0nJr+PZtzbXH+ X-Received: by 2002:a05:6402:305a:: with SMTP id bu26mr10973952edb.262.1599960439305; Sat, 12 Sep 2020 18:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599960439; cv=none; d=google.com; s=arc-20160816; b=Yk+Izl2K78zVGTrSIT2eCKswTygZzxdKXei+N6yeGC75u2yjQ5AXqpgVSITSoxTu2+ gz8XSBb3Mi0WSmr5IOpBkim7wwbRQ0HB7uQx5o7Vabhr9dhkx7TGD9E8OMLplI04HZpk iYseVOwciyjfJyOEkxLuIXfDVItQy2YInuY2btzR3LDV6xvLKOUZD+Hv5RRalKvFtF0z RTFQbettk5OFJ8pSHv6riReFpwo8nKWDY+E0rrA8e4bA1pxmZclkqpfeeGHUboYno4Er GD4qe+4eCMMabj0huz/byjbhYBuHyob47bRjEizx6AC4f3kCjf7SmO4LhOZ77DQGfwsJ lYWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=1ipqmBm0MBdeonBI9FeQHEqgjSfzmTCSYqVBliZz+uk=; b=CJik0w0cb4rWGkal4VwzVgvchDHsVLqSsNnhYRseKdWJmOT+Jba7HGZKewS/1cM6iA z6+9QZp60RRDdiGql8d74cviuS+Mhsh5IpnQp1qrO9BG1ovz1T6+6F9Ck1VGVmcjELWI yqXGfUs7nF1FOYxhVaHdEYzhAAB908cDF1gKaC59c6ql6518Tm7T+SNnq4u/zDsy/Sc9 zoB5xfZDF5mDXTRa9gg+X7oW8+P1mg+D5WYMdTkK1mQOJM2S/9IieRdBAEUntlivQmaD XpRyonoZbdsb1vNZDHkUEkH3Nkbvv+ZfQ/AYWUGyG0jne8hc9MSj5/QXTWXMrQONwB81 UUYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lk17si4064357ejb.188.2020.09.12.18.26.56; Sat, 12 Sep 2020 18:27:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725934AbgIMBXl (ORCPT + 99 others); Sat, 12 Sep 2020 21:23:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725889AbgIMBXi (ORCPT ); Sat, 12 Sep 2020 21:23:38 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78DA9C061574; Sat, 12 Sep 2020 18:23:38 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 6F162128FCF29; Sat, 12 Sep 2020 18:06:50 -0700 (PDT) Date: Sat, 12 Sep 2020 18:23:36 -0700 (PDT) Message-Id: <20200912.182336.585362420502143240.davem@davemloft.net> To: yepeilin.cs@gmail.com Cc: jmaloy@redhat.com, ying.xue@windriver.com, kuba@kernel.org, hdanton@sina.com, gregkh@linuxfoundation.org, netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net, linux-kernel-mentees@lists.linuxfoundation.org, syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH net] tipc: Fix memory leak in tipc_group_create_member() From: David Miller In-Reply-To: <20200912102230.1529402-1-yepeilin.cs@gmail.com> References: <000000000000879057058f193fb5@google.com> <20200912102230.1529402-1-yepeilin.cs@gmail.com> X-Mailer: Mew version 6.8 on Emacs 27.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [2620:137:e000::1:9]); Sat, 12 Sep 2020 18:06:50 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peilin Ye Date: Sat, 12 Sep 2020 06:22:30 -0400 > @@ -291,10 +291,11 @@ static void tipc_group_add_to_tree(struct tipc_group *grp, > else if (key > nkey) > n = &(*n)->rb_right; > else > - return; > + return -1; Use a real error code like "-EEXIST", thank you.