[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1446829059-10196-1-git-send-email-saurabh.truth@gmail.com>
Date: Fri, 6 Nov 2015 22:27:39 +0530
From: Saurabh Sengar <saurabh.truth@...il.com>
To: crope@....fi, mchehab@....samsung.com, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Saurabh Sengar <saurabh.truth@...il.com>
Subject: [PATCH] [media] hackrf: moving pointer reference before kfree
accessing a pointer after free could possible lead to segmentation
fault, hence correcting it
Signed-off-by: Saurabh Sengar <saurabh.truth@...il.com>
---
drivers/media/usb/hackrf/hackrf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/hackrf/hackrf.c b/drivers/media/usb/hackrf/hackrf.c
index e05bfec..faf3670 100644
--- a/drivers/media/usb/hackrf/hackrf.c
+++ b/drivers/media/usb/hackrf/hackrf.c
@@ -1528,9 +1528,9 @@ err_v4l2_ctrl_handler_free_tx:
err_v4l2_ctrl_handler_free_rx:
v4l2_ctrl_handler_free(&dev->rx_ctrl_handler);
err_kfree:
+ dev_dbg(dev->dev, "failed=%d\n", ret);
kfree(dev);
err:
- dev_dbg(dev->dev, "failed=%d\n", ret);
return ret;
}
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists