diff options
Diffstat (limited to 'libdimension/dimension')
-rw-r--r-- | libdimension/dimension/array.h | 4 | ||||
-rw-r--r-- | libdimension/dimension/list.h | 4 | ||||
-rw-r--r-- | libdimension/dimension/malloc.h | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/libdimension/dimension/array.h b/libdimension/dimension/array.h index fd78deb..85543cc 100644 --- a/libdimension/dimension/array.h +++ b/libdimension/dimension/array.h @@ -40,8 +40,8 @@ DMNSN_INLINE void dmnsn_delete_array(dmnsn_array *array) { if (array) { - free(array->ptr); - free(array); + dmnsn_free(array->ptr); + dmnsn_free(array); } } diff --git a/libdimension/dimension/list.h b/libdimension/dimension/list.h index bac9740..dba18dc 100644 --- a/libdimension/dimension/list.h +++ b/libdimension/dimension/list.h @@ -54,8 +54,8 @@ DMNSN_INLINE void dmnsn_delete_list_iterator(dmnsn_list_iterator *i) { if (i) { - free(i->ptr); - free(i); + dmnsn_free(i->ptr); + dmnsn_free(i); } } diff --git a/libdimension/dimension/malloc.h b/libdimension/dimension/malloc.h index 881f208..3c9e84b 100644 --- a/libdimension/dimension/malloc.h +++ b/libdimension/dimension/malloc.h @@ -29,3 +29,4 @@ void *dmnsn_malloc(size_t size); void *dmnsn_realloc(void *ptr, size_t size); char *dmnsn_strdup(const char *s); +void dmnsn_free(void *ptr); |