diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 6e74c4e83..7eb35d52d 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.03 - ============================ + Fix dm_strdup debug definition. Fix hash function to avoid using a negative array offset. Don't inline _find in hash.c and tidy signed/unsigned etc. Fix libdevmapper.h #endif. diff --git a/libdm/.exported_symbols b/libdm/.exported_symbols index 337b96d61..0d798cd23 100644 --- a/libdm/.exported_symbols +++ b/libdm/.exported_symbols @@ -64,7 +64,7 @@ dm_is_dm_major dm_mknodes dm_malloc_aux dm_malloc_aux_debug -dm_strdup +dm_strdup_aux dm_free_aux dm_realloc_aux dm_dump_memory_debug diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h index 74b3a4211..535e4a098 100644 --- a/libdm/libdevmapper.h +++ b/libdm/libdevmapper.h @@ -356,10 +356,9 @@ int dm_tree_node_add_target_area(struct dm_tree_node *node, * Memory management *******************/ -char *dm_strdup(const char *str); - void *dm_malloc_aux(size_t s, const char *file, int line); void *dm_malloc_aux_debug(size_t s, const char *file, int line); +char *dm_strdup_aux(const char *str); void dm_free_aux(void *p); void *dm_realloc_aux(void *p, unsigned int s, const char *file, int line); int dm_dump_memory_debug(void); @@ -368,6 +367,7 @@ void dm_bounds_check_debug(void); #ifdef DEBUG_MEM # define dm_malloc(s) dm_malloc_aux_debug((s), __FILE__, __LINE__) +# define dm_strdup(s) dm_strdup_aux(s) # define dm_free(p) dm_free_aux(p) # define dm_realloc(p, s) dm_realloc_aux(p, s, __FILE__, __LINE__) # define dm_dump_memory() dm_dump_memory_debug() @@ -376,6 +376,7 @@ void dm_bounds_check_debug(void); #else # define dm_malloc(s) dm_malloc_aux((s), __FILE__, __LINE__) +# define dm_strdup(s) strdup(s) # define dm_free(p) free(p) # define dm_realloc(p, s) realloc(p, s) # define dm_dump_memory() {}