From: Adrian Bunk Date: Wed, 27 Aug 2008 22:04:30 +0000 (+0300) Subject: dabusb_fpga_download(): fix a memory leak X-Git-Tag: v2.6.27-rc6~82^2~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=02c0267a40c876a4d70f2000f21fe9ff89fb988e;p=linux-2.6-omap-h63xx.git dabusb_fpga_download(): fix a memory leak This patch fixes a memory leak in an error path. Reported-by: Adrian Bunk Signed-off-by: Adrian Bunk Signed-off-by: David Woodhouse --- diff --git a/drivers/media/video/dabusb.c b/drivers/media/video/dabusb.c index 48f4b92a8f8..79faedf5852 100644 --- a/drivers/media/video/dabusb.c +++ b/drivers/media/video/dabusb.c @@ -403,6 +403,7 @@ static int dabusb_fpga_download (pdabusb_t s, const char *fname) ret = request_firmware(&fw, "dabusb/bitstream.bin", &s->usbdev->dev); if (ret) { err("Failed to load \"dabusb/bitstream.bin\": %d\n", ret); + kfree(b); return ret; }