login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2007
»
October
»
13
Re: [PATCH] Double-free in cx23885_initdev [sls][spam-bayes]
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Steven Toth
Subject:
Re: [PATCH] Double-free in cx23885_initdev [sls][spam-bayes]
Date: Saturday, October 13, 2007 - 8:46 am
Thanks for the patch, much appreciated. - Steve Florin Malita wrote:
quoted text
> 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 <fmalita@gmail.com> > --- > > drivers/media/video/cx23885/cx23885-core.c | 6 +----- > 1 file changed, 1 insertion(+), 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) > >
-
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH] Double-free in cx23885_initdev
, Florin Malita
, (Sat Oct 13, 7:49 am)
Re: [PATCH] Double-free in cx23885_initdev [sls][spam-bayes]
, Steven Toth
, (Sat Oct 13, 8:46 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth
Linux Kernel Mailing List
ixbge: remove TX lock and redo TX accounting.
Linux Kernel Mailing List
ixgbe: fix several counter register errata
Linux Kernel Mailing List
b43: fix build with CONFIG_SSB_PCIHOST=n
Linux Kernel Mailing List
9p: block-based virtio client
linux-netdev
: