]> err.no Git - linux-2.6/commitdiff
V4L/DVB (7328): usb/opera1.c: fix a memory leak
authorAdrian Bunk <bunk@kernel.org>
Thu, 28 Feb 2008 00:21:15 +0000 (21:21 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 20 Mar 2008 15:39:01 +0000 (12:39 -0300)
This patch fixes a memory leak in the "testval == 0x67" case spotted by
the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/dvb-usb/opera1.c

index 21935bf7059ee34f976914d82aaf22cd88fadb5d..302cc67407c397e17091bc729c078e9d63f54031 100644 (file)
@@ -478,9 +478,9 @@ static int opera1_xilinx_load_firmware(struct usb_device *dev,
                                err("could not restart the USB controller CPU.");
                                ret = -EINVAL;
                        }
-                       kfree(p);
                }
        }
+       kfree(p);
        if (fw) {
                release_firmware(fw);
        }