Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1264158
| From | Saurabh Sengar <saurabh.truth@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] [media] hackrf: moving pointer reference before kfree |
| Date | 2015-11-06 18:00 +0100 |
| Message-ID | <qrSwN-71N-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
accessing a pointer after free could possible lead to segmentation fault, hence correcting it Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] [media] hackrf: moving pointer reference before kfree Saurabh Sengar <saurabh.truth@gmail.com> - 2015-11-06 18:00 +0100
csiph-web