From mboxrd@z Thu Jan 1 00:00:00 1970 From: Or Gerlitz Subject: Re: [PATCH] IB: mlx4: Fix mem leaks in ib_link_query_port() Date: Sun, 15 Apr 2012 10:34:45 +0300 Message-ID: <4F8A7A15.4060908@mellanox.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jesper Juhl , Roland Dreier Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "David S. Miller" List-Id: linux-rdma@vger.kernel.org On 4/12/2012 12:43 AM, Jesper Juhl wrote: > If, in ib_link_query_port(), the call to mlx4_MAD_IFC() fails we will > currently do 'return err;' which will leak 'in_mad' and 'out_mad' that > we previously allocated. I believe we should instead do 'goto out;' > where we'll properly free the memory we previously allocated. Acked-by: Or Gerlitz Roland, could you push that? Or. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html