summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/dhcpv6-ia.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c
index 35c6ae3..98fb460 100644
--- a/src/dhcpv6-ia.c
+++ b/src/dhcpv6-ia.c
@@ -119,10 +119,8 @@ int setup_dhcpv6_ia_interface(struct interface *iface, bool enable)
free(a->hostname);
a->hostname = strdup(lease->hostname);
}
- } else {
- free(a->hostname);
- free(a);
- }
+ } else
+ free_dhcpv6_assignment(a);
}
}
return 0;