summaryrefslogtreecommitdiffstats
path: root/src/file_zip.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-11-01 12:19:20 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2013-11-01 12:19:20 +0100
commite4ed9d6e9d7335281a956d07b49aca4fcd978ba6 (patch)
tree3e6e2a1c3f10a155d1cd3fa1e1e39c85d128e5aa /src/file_zip.c
parent78ab592e113e29cec48a45913a43e22aefd9f94a (diff)
src/file_zip.c: fix memory leak in error path reported by Coverity scan
Diffstat (limited to 'src/file_zip.c')
-rw-r--r--src/file_zip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/file_zip.c b/src/file_zip.c
index 864d7dc..cc71c0a 100644
--- a/src/file_zip.c
+++ b/src/file_zip.c
@@ -216,11 +216,13 @@ static int zip_parse_file_entry(file_recovery_t *fr, const char **ext, const uns
log_trace("zip: Unexpected EOF in file_entry data: %u bytes expected\n",
compressed_size);
#endif
+ free(filename);
return -1;
}
if (fseek(fr->handle, -compressed_size, SEEK_CUR) < 0)
{
- log_info("fseek failed CGR\n");
+ log_info("fseek failed\n");
+ free(filename);
return -1;
}
if(compressed_size==28 && memcmp(buffer,"application/vnd.sun.xml.calc",28)==0)