]> err.no Git - linux-2.6/commitdiff
dabusb_fpga_download(): fix a memory leak
authorAdrian Bunk <bunk@kernel.org>
Wed, 27 Aug 2008 22:04:30 +0000 (01:04 +0300)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 2 Sep 2008 08:29:03 +0000 (09:29 +0100)
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>
drivers/media/video/dabusb.c

index 48f4b92a8f8b09a2f6b07418660ce2d7ce02e64f..79faedf585217f0e5cda3ac6902ce567dc9918c7 100644 (file)
@@ -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;
        }