Commit 8d7521cb authored by josé bollo's avatar josé bollo

Fix bug (freeing of partial on error)

Thanks to Thierry Fournier.

Fix: #1Signed-off-by: josé bollo's avatarJosé Bollo <jobol@nonadev.net>
parent a02c9a54
...@@ -47,7 +47,7 @@ static int getpartial(struct mustach_itf *itf, void *closure, const char *name, ...@@ -47,7 +47,7 @@ static int getpartial(struct mustach_itf *itf, void *closure, const char *name,
rc = fputc(0, file) ? MUSTACH_ERROR_SYSTEM : 0; rc = fputc(0, file) ? MUSTACH_ERROR_SYSTEM : 0;
fclose(file); fclose(file);
if (rc < 0) { if (rc < 0) {
free(result); free(*result);
*result = NULL; *result = NULL;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment