From 7a2e1a0a7a575c64eaf050c8ec08e5b36e4acfad 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 --- include/sqfs/data_reader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/sqfs/data_reader.h') diff --git a/include/sqfs/data_reader.h b/include/sqfs/data_reader.h index c967a70..29077b7 100644 --- a/include/sqfs/data_reader.h +++ b/include/sqfs/data_reader.h @@ -94,7 +94,7 @@ SQFS_API int sqfs_data_reader_load_fragment_table(sqfs_data_reader_t *data, * @param inode A pointer to the inode describing the file. * @param size Returns the size of the data read. * @param out Returns a pointer to the raw data that must be - * released using free. + * released using @ref sqfs_free. * * @return Zero on succcess, an @ref SQFS_ERROR value on failure. */ @@ -112,7 +112,7 @@ SQFS_API int sqfs_data_reader_get_fragment(sqfs_data_reader_t *data, * @param index The block index in the inodes block list. * @param size Returns the size of the data read. * @param out Returns a pointer to the raw data that must be - * released using free. + * released using @ref sqfs_free. * * @return Zero on succcess, an @ref SQFS_ERROR value on failure. */ -- cgit v1.2.3