* drm/i2c: tda998x: Fix memory leak in tda998x_encoder_init error path. [not found] <20140212171058.6CCD6660CAF@gitolite.kernel.org> @ 2014-02-13 3:47 ` Dave Jones 2014-02-13 19:46 ` Russell King - ARM Linux 0 siblings, 1 reply; 2+ messages in thread From: Dave Jones @ 2014-02-13 3:47 UTC (permalink / raw) To: Linux Kernel Mailing List; +Cc: moinejf, rmk+kernel, linux-coverity Commit 6ae668cc19e8b18df28cd67b3448d9abd79284a4 introduced a memory leak in the error path of tda998x_encoder_init Picked up by the nightly Coverity scan. CID 1174076 Signed-off-by: Dave Jones <davej@fedoraproject.org> diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index fa18cf374470..faa77f543a07 100644 --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -1151,8 +1151,10 @@ tda998x_encoder_init(struct i2c_client *client, priv->current_page = 0xff; priv->cec = i2c_new_dummy(client->adapter, 0x34); - if (!priv->cec) + if (!priv->cec) { + kfree(priv); return -ENODEV; + } priv->dpms = DRM_MODE_DPMS_OFF; encoder_slave->slave_priv = priv; ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: drm/i2c: tda998x: Fix memory leak in tda998x_encoder_init error path. 2014-02-13 3:47 ` drm/i2c: tda998x: Fix memory leak in tda998x_encoder_init error path Dave Jones @ 2014-02-13 19:46 ` Russell King - ARM Linux 0 siblings, 0 replies; 2+ messages in thread From: Russell King - ARM Linux @ 2014-02-13 19:46 UTC (permalink / raw) To: Dave Jones; +Cc: Linux Kernel Mailing List, moinejf, linux-coverity On Wed, Feb 12, 2014 at 10:47:51PM -0500, Dave Jones wrote: > Commit 6ae668cc19e8b18df28cd67b3448d9abd79284a4 introduced a memory leak > in the error path of tda998x_encoder_init > > Picked up by the nightly Coverity scan. CID 1174076 > > Signed-off-by: Dave Jones <davej@fedoraproject.org> Thanks Dave, patch applied, and will send to airlied soon. -- FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up. Estimation in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad. Estimate before purchase was "up to 13.2Mbit". ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-13 19:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20140212171058.6CCD6660CAF@gitolite.kernel.org>
2014-02-13 3:47 ` drm/i2c: tda998x: Fix memory leak in tda998x_encoder_init error path Dave Jones
2014-02-13 19:46 ` Russell King - ARM Linux
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox