[media] c8sectpfe: fix memory leak
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 2 Jun 2016 13:32:55 +0000 (10:32 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 12 Jul 2016 23:14:38 +0000 (20:14 -0300)
We have assigned memory while requesting the firmware but if the sanity
check fails then we are not releasing the firmware.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c

index 7dddf77a62cff5132bd4200511d273b1d1a37c0c..30c148b9d65e8c74eb7e8acfd8f9a070d5ef0750 100644 (file)
@@ -1161,6 +1161,7 @@ static int load_c8sectpfe_fw(struct c8sectpfei *fei)
        if (err) {
                dev_err(fei->dev, "c8sectpfe_elf_sanity_check failed err=(%d)\n"
                        , err);
+               release_firmware(fw);
                return err;
        }