diff options
author | Julian Eisel <julian@blender.org> | 2020-12-08 14:56:11 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-12-08 14:56:11 +0300 |
commit | 2a4fe88c13a1cb5bd79787e17eeaafec01c4d294 (patch) | |
tree | 95304deb9e1c3085062da219aa1c68d48bd22419 /source/blender/python/intern | |
parent | 296bc35638605b6172ccd058628e0d27258a5f5f (diff) |
Cleanup: Use guarded allocator for data-block names returned from file reading
Direcly using the C library allocator functions is usually avoided in favor of
our guarded allocator. It's more useful when debugging.
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r-- | source/blender/python/intern/bpy_library_load.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_library_load.c b/source/blender/python/intern/bpy_library_load.c index bc3d8b2c360..64590827933 100644 --- a/source/blender/python/intern/bpy_library_load.c +++ b/source/blender/python/intern/bpy_library_load.c @@ -44,6 +44,8 @@ #include "BLO_readfile.h" +#include "MEM_guardedalloc.h" + #include "bpy_capi_utils.h" #include "bpy_library.h" @@ -225,7 +227,7 @@ static PyObject *_bpy_names(BPy_Library *self, int blocktype) PyList_SET_ITEM(list, counter, PyUnicode_FromString((char *)l->link)); counter++; } - BLI_linklist_free(names, free); /* free linklist *and* each node's data */ + BLI_linklist_free(names, MEM_freeN); /* free linklist *and* each node's data */ } return list; |