From: Ali Ayoub Date: Tue, 13 Nov 2007 23:26:57 +0000 (-0800) Subject: mlx4_core: Fix possible bad free in mlx4_buf_free() X-Git-Tag: v2.6.24-rc3~14^2~6 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bba11e5c47dfc1d381a1ece26464fb7eea2d79c;p=pandora-kernel.git mlx4_core: Fix possible bad free in mlx4_buf_free() When mlx4_buf_free() is called from the error path of mlx4_buf_alloc(), it may be passed a buffer structure that does not have all pages filled in. Add a check for NULL to mlx4_buf_free() so we avoid passing NULL to dma_free_coherent() (which will crash). Signed-off-by: Ali Ayoub Signed-off-by: Jack Morgenstein Signed-off-by: Roland Dreier --- Reading git-diff-tree failed