From dbf0b343ec54ee8d34a003609a19fb74082d4afc Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Thu, 22 Sep 2016 11:31:19 +0200 Subject: [PATCH] device: fix NULL pointer dereference in dhcp6_start() Don't crash when nm_device_dhcp6_renew() calls dhcp6_start() with NULL @reason. Fixes: d1295b12e9f802867edef57ee02c87495df1683e --- src/devices/nm-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 243836f8f..86a5c3b79 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -6001,7 +6001,7 @@ dhcp6_start (NMDevice *self, gboolean wait_for_ll, NMDeviceStateReason *reason) } if (!dhcp6_start_with_link_ready (self, connection)) { - *reason = NM_DEVICE_STATE_REASON_DHCP_START_FAILED; + NM_SET_OUT (reason, NM_DEVICE_STATE_REASON_DHCP_START_FAILED); return FALSE; }