diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2014-11-11 19:11:03 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2014-11-11 19:11:03 +0100 |
commit | 5835c87f41f97a9f8f0c0ccbaea1615223e3b014 (patch) | |
tree | 12649264af660923bded5f0875933d8690723e4e | |
parent | a869ac25e174b7179f13557dd0a23840bf2cf327 (diff) |
set FILE* pointers to NULL
-rw-r--r-- | sfeed_frames.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sfeed_frames.c b/sfeed_frames.c index 683f9e0..57ff3d7 100644 --- a/sfeed_frames.c +++ b/sfeed_frames.c @@ -27,14 +27,22 @@ die(const char *s) { static void cleanup(void) { - if(fpmenu) + if(fpmenu) { fclose(fpmenu); - if(fpitems) + fpmenu = NULL; + } + if(fpitems) { fclose(fpitems); - if(fpindex) + fpitems = NULL; + } + if(fpindex) { fclose(fpindex); - if(fpcontent) + fpindex = NULL; + } + if(fpcontent) { fclose(fpcontent); + fpcontent = NULL; + } free(line); /* free line */ line = NULL; feedsfree(feeds); /* free feeds linked-list */ |