summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2014-05-08 10:21:08 +0000
committerHiltjo Posthuma <hiltjo@codemadness.org>2014-05-08 10:21:08 +0000
commit21f0cae92fbd34397f61f00502d974c102af3e58 (patch)
tree2021da90dc14c70dbe7981a749e713b3d09d6b26
parentf6e704a355904997d4333c937968681673586a8b (diff)
style: set pointer to NULL after free
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
-rw-r--r--sfeed_frames.c1
-rw-r--r--sfeed_html.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/sfeed_frames.c b/sfeed_frames.c
index 61730e2..679437b 100644
--- a/sfeed_frames.c
+++ b/sfeed_frames.c
@@ -39,6 +39,7 @@ cleanup(void) {
if(fpcontent)
fclose(fpcontent);
free(line); /* free line */
+ line = NULL;
feedsfree(feeds); /* free feeds linked-list */
}
diff --git a/sfeed_html.c b/sfeed_html.c
index 45d160b..4530005 100644
--- a/sfeed_html.c
+++ b/sfeed_html.c
@@ -14,6 +14,7 @@ static char *line = NULL;
static void
cleanup(void) {
free(line); /* free line */
+ line = NULL;
feedsfree(feeds); /* free feeds linked-list */
}