There is no point in setting extra_ies_len to the new value in
pasn_set_extra_ies() at the point when the old value is freed. This
setting happens already at the appropriate place after the new value has
been successfully assigned. Set extra_ies_len to 0 here so that it will
have value 0 in case the allocation fails and leaves extra_ies to NULL.
Signed-off-by: Jouni Malinen <j@w1.fi>
if (pasn->extra_ies) {
os_free((u8 *) pasn->extra_ies);
- pasn->extra_ies_len = extra_ies_len;
+ pasn->extra_ies_len = 0;
}
pasn->extra_ies = os_memdup(extra_ies, extra_ies_len);