From 5835c87f41f97a9f8f0c0ccbaea1615223e3b014 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Tue, 11 Nov 2014 19:11:03 +0100 Subject: set FILE* pointers to NULL --- sfeed_frames.c | 16 ++++++++++++---- 1 file 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 */ -- cgit v1.2.3