Skip to content

Commit def9391

Browse files
Abdun Nihaalgregkh
authored andcommitted
media: pci: zoran: fix potential memory leak in zoran_probe()
commit 8ea2143 upstream. The memory allocated for codec in videocodec_attach() is not freed in one of the error paths, due to an incorrect goto label. Fix the label to free it on error. Fixes: 8f7cc5c ("media: staging: media: zoran: introduce zoran_i2c_init") Cc: stable@vger.kernel.org Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 84d7810 commit def9391

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/media/pci/zoran/zoran_card.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1373,7 +1373,7 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
13731373
}
13741374
if (zr->codec->type != zr->card.video_codec) {
13751375
pci_err(pdev, "%s - wrong codec\n", __func__);
1376-
goto zr_unreg_videocodec;
1376+
goto zr_detach_codec;
13771377
}
13781378
}
13791379
if (zr->card.video_vfe != 0) {

0 commit comments

Comments
 (0)