Skip to content

Commit 530a401

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 0fee717 commit 530a401

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
@@ -1377,7 +1377,7 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
13771377
}
13781378
if (zr->codec->type != zr->card.video_codec) {
13791379
pci_err(pdev, "%s - wrong codec\n", __func__);
1380-
goto zr_unreg_videocodec;
1380+
goto zr_detach_codec;
13811381
}
13821382
}
13831383
if (zr->card.video_vfe != 0) {

0 commit comments

Comments
 (0)