V4L/DVB (8844): dabusb_fpga_download(): fix a memory leak
authorAdrian Bunk <bunk@kernel.org>
Wed, 3 Sep 2008 20:12:25 +0000 (17:12 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 3 Sep 2008 21:37:55 +0000 (18:37 -0300)
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: Mauro Carvalho Chehab <mchehab@redhat.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;
        }