return false;
}
- uint8_t *end = ((uint8_t*)buf) + len, *odata,
+ uint8_t *end = ((uint8_t*)buf) + len, *odata = NULL,
rcmsg = DHCPV6_MSG_UNKNOWN;
- uint16_t otype, olen;
+ uint16_t otype, olen = UINT16_MAX;
bool clientid_ok = false, serverid_ok = false, rcauth_ok = false,
ia_present = false, options_valid = true;
// Remove identical duid server candidate
for (i = 0; i < cand_len / sizeof(*c); ++i) {
if (cand->duid_len == c[i].duid_len &&
- !memcmp(cand->duid, c[i].duid, cand->duid_len)) {
+ !memcmp(cand->duid, c[i].duid, cand->duid_len)) {
free(c[i].ia_na);
free(c[i].ia_pd);
odhcp6c_remove_state(STATE_SERVER_CAND, i * sizeof(*c), sizeof(*c));
// Server candidates need deep delete for IA_NA/IA_PD
for (i = 0; i < cand_len / sizeof(*c); ++i) {
- if (c[i].ia_na)
- free(c[i].ia_na);
- if (c[i].ia_pd)
- free(c[i].ia_pd);
+ free(c[i].ia_na);
+ free(c[i].ia_pd);
}
odhcp6c_clear_state(STATE_SERVER_CAND);
}