From d3aae79e5c7ec24553b3d10bc640f418aceb65ef Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 1 Oct 2013 15:48:25 -0500 Subject: [PATCH] dhcp: fix IPv6 address prefixes (rh #1013583) 53e55aab365a263df5d2e13efe28a5dc5a7b8432 mistakenly moved the address prefix without moving the memset() to initialize the address. Make sure the address is initialized before trying to do anything with it. --- src/dhcp-manager/nm-dhcp-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dhcp-manager/nm-dhcp-client.c b/src/dhcp-manager/nm-dhcp-client.c index 1338c663de..7f6e6e5799 100644 --- a/src/dhcp-manager/nm-dhcp-client.c +++ b/src/dhcp-manager/nm-dhcp-client.c @@ -1348,6 +1348,7 @@ ip6_options_to_config (NMDHCPClient *self) g_return_val_if_fail (NM_IS_DHCP_CLIENT (self), NULL); + memset (&address, 0, sizeof (address)); address.plen = 128; address.timestamp = get_time (); @@ -1370,7 +1371,6 @@ ip6_options_to_config (NMDHCPClient *self) goto error; } - memset (&address, 0, sizeof (address)); address.address = tmp_addr; nm_log_info (LOGD_DHCP6, " address %s", str);