- Fixed: Attempt to free a non-heap object in zipdir.

SVN r2115 (trunk)
This commit is contained in:
Randy Heit 2010-01-18 05:07:10 +00:00
parent 6c9748b603
commit a3ac7ee081
1 changed files with 6 additions and 2 deletions

View File

@ -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;
}