diff --git a/archivers/zip.c b/archivers/zip.c index c84630e..fbbc2fd 100644 --- a/archivers/zip.c +++ b/archivers/zip.c @@ -399,6 +399,7 @@ static int ZIP_fileClose(FileHandle *handle) free(finfo->buffer); free(finfo); + free(handle); return(1); } /* ZIP_fileClose */ diff --git a/platform/posix.c b/platform/posix.c index dec7c8e..03a71f5 100644 --- a/platform/posix.c +++ b/platform/posix.c @@ -471,6 +471,7 @@ int __PHYSFS_platformClose(void *opaque) { int fd = *((int *) opaque); BAIL_IF_MACRO(close(fd) == -1, strerror(errno), 0); + free(opaque); return(1); } /* __PHYSFS_platformClose */