if (hardware->h_ifdescr_previous == NULL ||
strcmp(hardware->h_ifdescr_previous, description)) {
priv_iface_description(hardware->h_ifname, description);
free(hardware->h_ifdescr_previous);
hardware->h_ifdescr_previous = description;
} else
free(description);
assume hardware->h_ifdescr_previous = NULL , then it will enter the loop and it is getting free-----> segfault
pls take care
Hi Vincent, https://github.com/lldpd/lldpd/commit/aa6e92977681a8816718c1b1e820b9b415d36a2a
if (hardware->h_ifdescr_previous == NULL || strcmp(hardware->h_ifdescr_previous, description)) { priv_iface_description(hardware->h_ifname, description); free(hardware->h_ifdescr_previous); hardware->h_ifdescr_previous = description; } else free(description); assume hardware->h_ifdescr_previous = NULL , then it will enter the loop and it is getting free-----> segfault pls take care