Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fcf94c89af8acccb14ce37b1c9e8dd6bd32a999d Commit: fcf94c89af8acccb14ce37b1c9e8dd6bd32a999d Parent: a13625c518ca6fd3ff7cb3b66d8023f843a745a3 Author: Florin Malita <[EMAIL PROTECTED]> AuthorDate: Sat Oct 13 11:49:52 2007 -0300 Committer: Mauro Carvalho Chehab <[EMAIL PROTECTED]> CommitDate: Mon Oct 22 12:01:36 2007 -0200
V4L/DVB (6325): Double-free in cx23885_initdev Both cx23885_initdev and cx23885_dev_setup free the device in their error path so a failure in the latter causes a double-free. Since cx23885_dev_setup is only called from cx23885_initdev, it should be safe to remove its deallocation and leave the cleanup up to the allocating function. Coverity CID 1922. Signed-off-by: Florin Malita <[EMAIL PROTECTED]> CC: Steven Toth <[EMAIL PROTECTED]> Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]> --- drivers/media/video/cx23885/cx23885-core.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c index af16505..3cdd136 100644 --- a/drivers/media/video/cx23885/cx23885-core.c +++ b/drivers/media/video/cx23885/cx23885-core.c @@ -793,7 +793,7 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) dev->pci->subsystem_device); cx23885_devcount--; - goto fail_free; + return -ENODEV; } /* PCIe stuff */ @@ -835,10 +835,6 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) } return 0; - -fail_free: - kfree(dev); - return -ENODEV; } void cx23885_dev_unregister(struct cx23885_dev *dev) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html