Skip to content

Commit

Permalink
Fix leak on findalldevs results
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed Dec 11, 2023
1 parent b9f2277 commit 19acd26
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions userland/lib/pfring.c
Original file line number Diff line number Diff line change
Expand Up @@ -1515,10 +1515,11 @@ void pfring_freealldevs(pfring_if_t *list) {
pfring_if_t *tmp = list;
while (tmp) {
list = list->next;
if (tmp->name) free(tmp->name);
if (tmp->system_name) free(tmp->system_name);
if (tmp->module) free(tmp->module);
if (tmp->sn) free(tmp->sn);
if (tmp->name) free(tmp->name);
if (tmp->system_name) free(tmp->system_name);
if (tmp->module) free(tmp->module);
if (tmp->module_version) free(tmp->module_version);
if (tmp->sn) free(tmp->sn);
free(tmp);
tmp = list;
}
Expand Down

0 comments on commit 19acd26

Please sign in to comment.