From a3739ada111bf4e36ae7576b24176d1db55e1365 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 8 Apr 2021 12:04:33 +0200 Subject: Fix: libsquashfs: add sqfs_free() function On systems like Windows, the dynamic library and applications can easily end up being linked against different runtime libraries, so applications cannot be expected to be able to free() any malloc'd pointer that the library returns. This commit adds an sqfs_free function so the application can pass pointers back to the library to call the correct free() implementation. Signed-off-by: David Oberhollenzer --- bin/rdsquashfs/stat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/rdsquashfs/stat.c') diff --git a/bin/rdsquashfs/stat.c b/bin/rdsquashfs/stat.c index 049baae..a5aab60 100644 --- a/bin/rdsquashfs/stat.c +++ b/bin/rdsquashfs/stat.c @@ -172,7 +172,7 @@ int stat_file(const sqfs_tree_node_t *node) idx->size + 1, idx->name, idx->start_block, idx->index); - free(idx); + sqfs_free(idx); } break; } -- cgit v1.2.3