ssnail

crappy and opinionated static site generator
git clone https://git.e1e0.net/ssnail.git
Log | Files | Refs | README | LICENSE

commit a1999ca863950860606ac34999a48df10b614b4a
parent 4da4a5f92e802fd16f16433713789734dd7431da
Author: Paco Esteban <paco@e1e0.net>
Date:   Wed,  1 Jul 2020 11:34:23 +0200

guard article_free

Diffstat:
Mssnail.c | 20+++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/ssnail.c b/ssnail.c @@ -172,15 +172,17 @@ free_articleq(struct listhead *h) static void free_article(struct article *a) { - free(a->src_path); - free(a->dst_path); - free(a->orig_content); - free(a->html_content); - free(a->title); - free(a->author); - free(a->date); - free(a->type); - free(a); + if (a) { + free(a->src_path); + free(a->dst_path); + free(a->orig_content); + free(a->html_content); + free(a->title); + free(a->author); + free(a->date); + free(a->type); + free(a); + } } static const struct ssnail_error *