* [lm-sensors] [PATCH] hwmon: (iio_hwmon) Fix null pointer dereference
@ 2013-05-13 13:37 Axel Lin
2013-05-13 13:44 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-05-13 13:37 UTC (permalink / raw)
To: lm-sensors
This patch fixes the null pointer dereference in goto error_release_channels
path when allocate memory for st fails.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/hwmon/iio_hwmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/iio_hwmon.c b/drivers/hwmon/iio_hwmon.c
index 368497f..52b77af 100644
--- a/drivers/hwmon/iio_hwmon.c
+++ b/drivers/hwmon/iio_hwmon.c
@@ -161,7 +161,7 @@ static int iio_hwmon_probe(struct platform_device *pdev)
error_remove_group:
sysfs_remove_group(&dev->kobj, &st->attr_group);
error_release_channels:
- iio_channel_release_all(st->channels);
+ iio_channel_release_all(channels);
return ret;
}
--
1.8.1.2
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [lm-sensors] [PATCH] hwmon: (iio_hwmon) Fix null pointer dereference
2013-05-13 13:37 [lm-sensors] [PATCH] hwmon: (iio_hwmon) Fix null pointer dereference Axel Lin
@ 2013-05-13 13:44 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2013-05-13 13:44 UTC (permalink / raw)
To: lm-sensors
On Mon, May 13, 2013 at 09:37:26PM +0800, Axel Lin wrote:
> This patch fixes the null pointer dereference in goto error_release_channels
> path when allocate memory for st fails.
>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
That was quick.
Applied, thanks.
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-13 13:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-13 13:37 [lm-sensors] [PATCH] hwmon: (iio_hwmon) Fix null pointer dereference Axel Lin
2013-05-13 13:44 ` Guenter Roeck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.