Clean columns on exit.

Change-Id: I950295c35fc67193d9825ebc741da151ad99e077
Reviewed-on: https://code.wireshark.org/review/19941
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Dario Lombardo 2017-02-03 22:41:31 +01:00 committed by Michael Mann
parent b54c438011
commit 59fc668845
5 changed files with 6 additions and 1 deletions

View File

@ -122,7 +122,8 @@ col_cleanup(column_info *cinfo)
*/
g_free((gchar **)cinfo->col_expr.col_expr);
g_free(cinfo->col_expr.col_expr_val);
g_regex_unref(cinfo->prime_regex);
if (cinfo->prime_regex)
g_regex_unref(cinfo->prime_regex);
}
/* Initialize the data structures for constructing column data. */

View File

@ -297,6 +297,7 @@ main(int argc, char *argv[])
ret = sharkd_loop();
clean_exit:
col_cleanup(&cfile.cinfo);
return ret;
}

View File

@ -2200,6 +2200,7 @@ clean_exit:
#ifdef HAVE_LIBPCAP
capture_opts_cleanup(&global_capture_opts);
#endif
col_cleanup(&cfile.cinfo);
return exit_status;
}

View File

@ -2814,6 +2814,7 @@ clean_exit:
#ifdef HAVE_LIBPCAP
capture_opts_cleanup(&global_capture_opts);
#endif
col_cleanup(&cfile.cinfo);
return ret;
}

View File

@ -946,6 +946,7 @@ clean_exit:
#ifdef HAVE_LIBPCAP
capture_opts_cleanup(&global_capture_opts);
#endif
col_cleanup(&CaptureFile::globalCapFile()->cinfo);
return ret_val;
}