Re: [PATCH 1/2] media: video/tuner-core, fix memory leak

2010-01-06 Thread Jiri Slaby
On 01/06/2010 05:47 PM, Jiri Slaby wrote:
 Stanse found a memory leak in tuner_probe. t is not
 freed/assigned on all paths. Fix that.

Oops. I generated two patches here, only the second is for PCI.

Sorry Mauro, you got this one twice.

-- 
js
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] media: video/tuner-core, fix memory leak

2010-01-06 Thread Jiri Slaby
Stanse found a memory leak in tuner_probe. t is not
freed/assigned on all paths. Fix that.

Signed-off-by: Jiri Slaby jsl...@suse.cz
Cc: Mauro Carvalho Chehab mche...@infradead.org
Cc: linux-media@vger.kernel.org
---
 drivers/media/video/tuner-core.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 5b3eaa1..c4dab6c 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -1078,6 +1078,7 @@ static int tuner_probe(struct i2c_client *client,
 
goto register_client;
}
+   kfree(t);
return -ENODEV;
case 0x42:
case 0x43:
-- 
1.6.5.7

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html