Commit 2a2cc1d8 authored by Manuel Mohr's avatar Manuel Mohr
Browse files

stat: Nullify pointers during cleanup.

parent 635e1133
......@@ -199,9 +199,12 @@ void stat_ev_begin(const char *prefix, const char *filt)
void stat_ev_end(void)
{
if (stat_ev_file) {
if (stat_ev_file != NULL) {
fclose(stat_ev_file);
stat_ev_file = NULL;
}
if (filter != NULL)
if (filter != NULL) {
regfree(filter);
filter = NULL;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment