Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1950597AbdDYPgT (ORCPT ); Tue, 25 Apr 2017 11:36:19 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:40784 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1950376AbdDYPgA (ORCPT ); Tue, 25 Apr 2017 11:36:00 -0400 Date: Tue, 25 Apr 2017 11:35:58 -0400 (EDT) Message-Id: <20170425.113558.689750765066812978.davem@davemloft.net> To: bianpan2016@163.com Cc: jiri@resnulli.us, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] team: fix memory leaks From: David Miller In-Reply-To: <1493029756-13171-1-git-send-email-bianpan2016@163.com> References: <1493029756-13171-1-git-send-email-bianpan2016@163.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) 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 [149.20.54.216]); Tue, 25 Apr 2017 07:54:35 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 472 Lines: 12 From: Pan Bian Date: Mon, 24 Apr 2017 18:29:16 +0800 > In functions team_nl_send_port_list_get() and > team_nl_send_options_get(), pointer skb keeps the return value of > nlmsg_new(). When the call to genlmsg_put() fails, the memory is not > freed(). This will result in memory leak bugs. > > Fixes: 9b00cf2d1024 ("team: implement multipart netlink messages for options transfers") > Signed-off-by: Pan Bian Applied, thanks.