Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fa746a... Commit: fa746aee336fedfe25e6945e5967399966948420 Parent: c7919d520f4c9a064ae14bc4dd170c4c12ead2af Author: Michael Krufky <mkrufky@linuxtv.org> AuthorDate: Sun Dec 9 05:16:10 2007 -0300 Committer: Mauro Carvalho Chehab <mchehab@infradead.org> CommitDate: Fri Jan 25 19:03:27 2008 -0200 V4L/DVB (6784): tda8290: prevent possible memory leak Always call tda829x_release if tda829x_attach fails for a reason other than failure to allocate memory for private structure. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> --- drivers/media/video/tda8290.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index 245b202..a39cb1f 100644 --- a/drivers/media/video/tda8290.c +++ b/drivers/media/video/tda8290.c @@ -704,7 +704,7 @@ int tda829x_attach(struct tuner *t) } if (tda829x_find_tuner(fe) < 0) - return -EINVAL; + goto fail; if (priv->ver & TDA8290) { tda8290_init_tuner(fe); @@ -717,6 +717,11 @@ int tda829x_attach(struct tuner *t) t->mode = V4L2_TUNER_ANALOG_TV; return 0; + +fail: + tda829x_release(fe); + fe->ops.analog_demod_ops = NULL; + return -EINVAL; } EXPORT_SYMBOL_GPL(tda829x_attach); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Greg KH | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Andrew Morton | Re: 2.6.23-rc6-mm1 |
| Luciano Rocha | usb hdd problems with 2.6.27.2 |
git: | |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Andrew Morton | Re: [BUG] New Kernel Bugs |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | [PATCH take 2] pkt_sched: Protect gen estimators under est_lock. |
