summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-08-28 02:04:30 +0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-09-02 12:29:03 +0400
commit02c0267a40c876a4d70f2000f21fe9ff89fb988e (patch)
treed585697289adfdab1becc13b65c9e1a62dacf3b7
parent0ed97ee470c36e05bcaad36c4fb4c501f383ce63 (diff)
downloadlinux-02c0267a40c876a4d70f2000f21fe9ff89fb988e.tar.xz
dabusb_fpga_download(): fix a memory leak
This patch fixes a memory leak in an error path. Reported-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/media/video/dabusb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/dabusb.c b/drivers/media/video/dabusb.c
index 48f4b92a8f8b..79faedf58521 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;
}