summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/file.c b/file.c
index a8c014235..1e141b708 100644
--- a/file.c
+++ b/file.c
@@ -122,8 +122,10 @@ static int try_to_xslt_open_csv(const char *filename, struct memblock *mem, char
memcpy(mem->buffer + mem->size + 5, "</csv>", 7);
mem->buffer = buf;
mem->size += strlen("<csv></csv>");
- } else
+ } else {
+ free(mem->buffer);
return 1;
+ }
return 0;
}