diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2021-04-08 12:04:33 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2021-04-08 12:04:33 +0200 |
commit | a3739ada111bf4e36ae7576b24176d1db55e1365 (patch) | |
tree | a7c0eee1aacf91137c6f163a7dc301cf114125ff /include/sqfs/meta_reader.h | |
parent | 7c6c0c07dda1f44b930ee2dbb9451979b6a2cb83 (diff) |
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/sqfs/meta_reader.h')
-rw-r--r-- | include/sqfs/meta_reader.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/sqfs/meta_reader.h b/include/sqfs/meta_reader.h index bac1808..e0dc186 100644 --- a/include/sqfs/meta_reader.h +++ b/include/sqfs/meta_reader.h @@ -145,7 +145,7 @@ SQFS_API int sqfs_meta_reader_read_dir_header(sqfs_meta_reader_t *m, * * @param m A pointer to a meta data reader. * @param ent Returns a pointer to a directory entry. Can be released with a - * single free() call. + * single @ref sqfs_free call. * * @return Zero on success, an @ref SQFS_ERROR value on failure. */ @@ -167,7 +167,7 @@ SQFS_API int sqfs_meta_reader_read_dir_ent(sqfs_meta_reader_t *m, * @param offset A byte offset within the uncompressed block where the * inode is. * @param out Returns a pointer to an inode. Can be released with a - * single free() call. + * single @ref sqfs_free call. * * @return Zero on success, an @ref SQFS_ERROR value on failure. */ |