From a3ac7ee081af8935254bfe83a47575c71b7878ef Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 18 Jan 2010 05:07:10 +0000 Subject: [PATCH] - Fixed: Attempt to free a non-heap object in zipdir. SVN r2115 (trunk) --- tools/zipdir/zipdir.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/zipdir/zipdir.c b/tools/zipdir/zipdir.c index 0daf927f99..01a9979588 100644 --- a/tools/zipdir/zipdir.c +++ b/tools/zipdir/zipdir.c @@ -1027,9 +1027,13 @@ int append_to_zip(FILE *zip_file, file_sorted_t *filep, FILE *ozip, BYTE *odir) } fprintf(stderr, "Unable to write %s to zip\n", file->path); free(readbuf); - if (compbuf != NULL) + if (compbuf[0] != NULL) { - free(compbuf); + free(compbuf[0]); + } + if (compbuf[1] != NULL) + { + free(compbuf[1]); } return 1; }