Type: fix
Attempting to create a host-interface with an invalid af_packet name
causes a crash, as we attempt to read the contents of a null ptr.
Change-Id: Ia31ae21684c2b66baa1ceaadf29e19fae33c4ed4
Signed-off-by: hsandid <halsandi@cisco.com>
- vec_foreach_index (i, apif->fds)
- if (apif->fds[i] != -1)
- close (apif->fds[i]);
- vec_free (apif->fds);
vec_free (host_if_name_dup);
vec_free (host_if_name_dup);
+ vec_foreach_index (i, apif->fds)
+ if (apif->fds[i] != -1)
+ close (apif->fds[i]);
+ vec_free (apif->fds);
memset (apif, 0, sizeof (*apif));
pool_put (apm->interfaces, apif);
}
memset (apif, 0, sizeof (*apif));
pool_put (apm->interfaces, apif);
}