瀏覽代碼

Patched memory leaks (thanks, Valgrind!)

Ryan C. Gordon 24 年之前
父節點
當前提交
d701627335
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      archivers/zip.c
  2. 1 0
      platform/posix.c

+ 1 - 0
archivers/zip.c

@@ -399,6 +399,7 @@ static int ZIP_fileClose(FileHandle *handle)
         free(finfo->buffer);
 
     free(finfo);
+    free(handle);
     return(1);
 } /* ZIP_fileClose */
 

+ 1 - 0
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 */