From 3dcad00c8acd703692190cb3702a2ed32e8f8871 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 (cherry picked from commit dbf0b343ec54ee8d34a003609a19fb74082d4afc) (cherry picked from commit 6c4a6f2b755c6b9de1617830e2708cd1687b4dfa) --- 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 62259bc4ae..03fc31c652 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -5547,7 +5547,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; }