cli: free memory on exit in tap-comparestat (found by clang).

Change-Id: Ie4dfc68583fa6fc742baeaf9d9fd1c7d2f783f38
Reviewed-on: https://code.wireshark.org/review/25435
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Dario Lombardo 2018-01-19 14:24:31 +01:00 committed by Michael Mann
parent 907d8ff41f
commit bc36e2a113
1 changed files with 5 additions and 2 deletions

View File

@ -232,12 +232,15 @@ call_foreach_count_ip_id(gpointer key _U_, gpointer value, gpointer arg)
/* collect TTL's */
if (TTL_method && (fInfo->num < TTL_SEARCH)) {
gboolean found = FALSE;
for (i=0; i < cs->ip_ttl_list->len; i++) {
if (g_array_index(cs->ip_ttl_list, guint8, i) == fInfo->ip_ttl) {
return;
found = TRUE;
break;
}
}
g_array_append_val(cs->ip_ttl_list, fInfo->ip_ttl);
if (!found)
g_array_prepend_val(cs->ip_ttl_list, fInfo->ip_ttl);
}
g_free(pinfo->fd);