Fix assignment dereference by dhcpv6_log in case
the assignment is freed when nothing has been
assigned.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
((is_pd && c->length <= 64) || (is_na && c->length == 128))) {
a = c;
((is_pd && c->length <= 64) || (is_na && c->length == 128))) {
a = c;
apply_lease(iface, a, false);
memcpy(a->clid_data, clid_data, clid_len);
a->clid_len = clid_len;
apply_lease(iface, a, false);
memcpy(a->clid_data, clid_data, clid_len);
a->clid_len = clid_len;
a->accept_reconf = accept_reconf;
a->flags |= OAF_BOUND;
apply_lease(iface, a, true);
a->accept_reconf = accept_reconf;
a->flags |= OAF_BOUND;
apply_lease(iface, a, true);
- } else if (!assigned && a && a->managed_size == 0)
+ } else if (!assigned && a && a->managed_size == 0) {
/* Cleanup failed assignment */
free_dhcpv6_assignment(a);
/* Cleanup failed assignment */
free_dhcpv6_assignment(a);
} else if (hdr->msg_type == DHCPV6_MSG_RENEW ||
hdr->msg_type == DHCPV6_MSG_RELEASE ||
hdr->msg_type == DHCPV6_MSG_REBIND ||
} else if (hdr->msg_type == DHCPV6_MSG_RENEW ||
hdr->msg_type == DHCPV6_MSG_RELEASE ||
hdr->msg_type == DHCPV6_MSG_REBIND ||