hwmon: (iio_hwmon) Fix null pointer dereference
PATCH 1/1 hwmon: (iio_hwmon) Fix null pointer dereference
This patch fixes the null pointer dereference in goto error_release_channels path when allocate memory for st fails.
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Axel Lin <[email protected]>
--- drivers/hwmon/iio_hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/iio_hwmon.c +1 -1
@@ -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; }
Signature · 9 lines
1.8.1.2 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 5 lines · Axel Lin
This patch fixes the null pointer dereference in goto
error_release_channelspath when allocate memory for st fails.Reported-by Dan Carpenter <[email protected]>Signed-off-by Axel Lin <[email protected]>
That was quick.
Applied, thanks.
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors