Re: [PATCH] IB: mlx4: Fix mem leaks in ib_link_query_port()

From: Or Gerlitz
Date: Sun Apr 15 2012 - 03:35:44 EST


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 <ogerlitz@xxxxxxxxxxxx>

Roland, could you push that?

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/