This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-dvb.git tree:

Subject: V4L/DVB: media/mem2mem: dereferencing free memory
Author:  Dan Carpenter <[email protected]>
Date:    Wed May 5 02:58:57 2010 -0300

We dereferenced "ctx" on the error path.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/video/mem2mem_testdev.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

---

http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=6fa24a4ed34a0b6f66f6535cb84e9f257d78360d

diff --git a/drivers/media/video/mem2mem_testdev.c 
b/drivers/media/video/mem2mem_testdev.c
index baf211b..b161d26 100644
--- a/drivers/media/video/mem2mem_testdev.c
+++ b/drivers/media/video/mem2mem_testdev.c
@@ -871,8 +871,10 @@ static int m2mtest_open(struct file *file)
 
        ctx->m2m_ctx = v4l2_m2m_ctx_init(ctx, dev->m2m_dev, queue_init);
        if (IS_ERR(ctx->m2m_ctx)) {
+               int ret = PTR_ERR(ctx->m2m_ctx);
+
                kfree(ctx);
-               return PTR_ERR(ctx->m2m_ctx);
+               return ret;
        }
 
        atomic_inc(&dev->num_inst);

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to