commit c80fe54bfc37aa766997bf7a999813ea4452937c
parent 1021b15eb2116a531a03a0b7d5c0e61afdac0e55
Author: Paco Esteban <paco@e1e0.net>
Date: Sun, 24 May 2020 17:36:08 +0200
close dir and free temp buffer early
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ssnail.c b/ssnail.c
@@ -102,6 +102,8 @@ main(int argc, char *argv[])
SLIST_INSERT_HEAD(&head, a, entries);
}
}
+ closedir(dirp);
+ free(fbuf);
printf("Generating html files ... \n");
SLIST_FOREACH(ap, &head, entries) {
@@ -112,9 +114,7 @@ main(int argc, char *argv[])
}
}
- closedir(dirp);
articleq_free(&head);
- free(fbuf);
return 0;
}