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

Subject: [media] ov772x: Fix memory leak in probe error path
Author:  Laurent Pinchart <[email protected]>
Date:    Wed Jul 18 10:58:18 2012 -0300

The control handler isn't freed if its initialization fails. Fix it.

Signed-off-by: Laurent Pinchart <[email protected]>
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/i2c/soc_camera/ov772x.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=edff996eb942ce5595e9b60a0e06586dcc41b19b

diff --git a/drivers/media/i2c/soc_camera/ov772x.c 
b/drivers/media/i2c/soc_camera/ov772x.c
index 641f6f4..0fede50d 100644
--- a/drivers/media/i2c/soc_camera/ov772x.c
+++ b/drivers/media/i2c/soc_camera/ov772x.c
@@ -1098,18 +1098,17 @@ static int ov772x_probe(struct i2c_client *client,
                        V4L2_CID_BAND_STOP_FILTER, 0, 256, 1, 0);
        priv->subdev.ctrl_handler = &priv->hdl;
        if (priv->hdl.error) {
-               int err = priv->hdl.error;
-
-               kfree(priv);
-               return err;
+               ret = priv->hdl.error;
+               goto done;
        }
 
        ret = ov772x_video_probe(client);
+
+done:
        if (ret) {
                v4l2_ctrl_handler_free(&priv->hdl);
                kfree(priv);
        }
-
        return ret;
 }
 

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

Reply via email to