diff options
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/blend_validate.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readblenentry.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/blend_validate.c b/source/blender/blenloader/intern/blend_validate.c index 2848aac2c77..9b42e2d5f40 100644 --- a/source/blender/blenloader/intern/blend_validate.c +++ b/source/blender/blenloader/intern/blend_validate.c @@ -148,7 +148,7 @@ bool BLO_main_validate_libraries(Main *bmain, ReportList *reports) } } - BLI_linklist_free(names, free); + BLI_linklist_free(names, MEM_freeN); } BLO_blendhandle_close(bh); diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index 7a527b82e9f..1aecba5ba90 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -134,7 +134,7 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp) * \param bh: The blendhandle to access. * \param ofblocktype: The type of names to get. * \param tot_names: The length of the returned list. - * \return A BLI_linklist of strings. The string links should be freed with malloc. + * \return A BLI_linklist of strings. The string links should be freed with #MEM_freeN(). */ LinkNode *BLO_blendhandle_get_datablock_names(BlendHandle *bh, int ofblocktype, int *tot_names) { @@ -147,7 +147,7 @@ LinkNode *BLO_blendhandle_get_datablock_names(BlendHandle *bh, int ofblocktype, if (bhead->code == ofblocktype) { const char *idname = blo_bhead_id_name(fd, bhead); - BLI_linklist_prepend(&names, strdup(idname + 2)); + BLI_linklist_prepend(&names, BLI_strdup(idname + 2)); tot++; } else if (bhead->code == ENDB) { @@ -254,7 +254,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to * (e.g. "Scene", "Mesh", "Light", etc.). * * \param bh: The blendhandle to access. - * \return A BLI_linklist of strings. The string links should be freed with malloc. + * \return A BLI_linklist of strings. The string links should be freed with #MEM_freeN(). */ LinkNode *BLO_blendhandle_get_linkable_groups(BlendHandle *bh) { @@ -272,7 +272,7 @@ LinkNode *BLO_blendhandle_get_linkable_groups(BlendHandle *bh) const char *str = BKE_idtype_idcode_to_name(bhead->code); if (BLI_gset_add(gathered, (void *)str)) { - BLI_linklist_prepend(&names, strdup(str)); + BLI_linklist_prepend(&names, BLI_strdup(str)); } } } |