aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ical.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ical.c b/src/ical.c
index 4a7738e..6d2d8d2 100644
--- a/src/ical.c
+++ b/src/ical.c
@@ -214,7 +214,8 @@ static void ical_export_note(FILE *stream, char *name)
asprintf(&note_file, "%s/%s", path_notes, name);
if (!(fp = fopen(note_file, "r")) || ungetc(getc(fp), fp) == EOF) {
- fclose(fp);
+ if (fp)
+ fclose(fp);
return;
}
string_init(&note);