From: José Bollo Date: Tue, 14 Feb 2017 10:36:57 +0000 (+0100) Subject: Fix bug in mustach.c X-Git-Tag: x-last-without-systemd~22 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-main.git;a=commitdiff_plain;h=b0ac8a02e6c0c78b275f85697bd1da5be3b57876 Fix bug in mustach.c Change-Id: I353ae1cc33795ba8ffd98fcec503125ec9d455a3 Signed-off-by: José Bollo --- diff --git a/src/mustach.c b/src/mustach.c index 19df16f..5bf9f56 100644 --- a/src/mustach.c +++ b/src/mustach.c @@ -47,7 +47,7 @@ static int getpartial(struct mustach_itf *itf, void *closure, const char *name, rc = fputc(0, file) ? MUSTACH_ERROR_SYSTEM : 0; fclose(file); if (rc < 0) { - free(result); + free(*result); *result = NULL; } }