Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1169122AbdDXLEZ (ORCPT ); Mon, 24 Apr 2017 07:04:25 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:33642 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1168977AbdDXLEJ (ORCPT ); Mon, 24 Apr 2017 07:04:09 -0400 Date: Mon, 24 Apr 2017 13:04:05 +0200 From: Jiri Pirko To: Pan Bian Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] team: fix memory leaks Message-ID: <20170424110405.GE4126@nanopsycho.orion> References: <1493029756-13171-1-git-send-email-bianpan2016@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1493029756-13171-1-git-send-email-bianpan2016@163.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 478 Lines: 10 Mon, Apr 24, 2017 at 12:29:16PM CEST, bianpan2016@163.com wrote: >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 Acked-by: Jiri Pirko