/** => zzip_disk_mmap * * This function will release all data needed to access a (mmapped) * zip archive, including any malloc()ed blocks, sharedmem mappings * and it dumps the handle struct as well. */ int zzip_disk_close(ZZIP_DISK* disk) { if (! disk) return 0; if (disk->mapped != -1) return zzip_disk_munmap (disk); free (disk->buffer); free (disk); return 0; }
/** => zzip_disk_mmap * * This function will release all data needed to access a (mmapped) * zip archive, including any malloc()ed blocks, sharedmem mappings * and it dumps the handle struct as well. */ int zzip_disk_close(ZZIP_DISK * disk) { if (! disk) return 0; if (disk->mapped != -1) return zzip_disk_munmap(disk); if (disk->flags & ZZIP_DISK_FLAGS_OWNED_BUFFER) free(disk->buffer); free(disk); return 0; }