summaryrefslogtreecommitdiffhomepage
path: root/ir/stat
diff options
context:
space:
mode:
authorManuel Mohr <manuel.mohr@kit.edu>2013-01-30 15:36:22 +0100
committerManuel Mohr <manuel.mohr@kit.edu>2013-01-30 15:36:22 +0100
commit2a2cc1d8e9a5a4c320641da0801d02fd02700227 (patch)
treee398b3f4737a7bc545f19dedfea377545d7b2830 /ir/stat
parent635e1133993ed1c3ee39c75979147393d799137c (diff)
stat: Nullify pointers during cleanup.
Diffstat (limited to 'ir/stat')
-rw-r--r--ir/stat/statev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ir/stat/statev.c b/ir/stat/statev.c
index eb6e757..765ac12 100644
--- a/ir/stat/statev.c
+++ b/ir/stat/statev.c
@@ -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;
+ }
}