diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-02-15 17:55:13 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-02-15 17:55:13 +0300 |
commit | f1ee11fcca20ce1fb7db97a71e7e345c6faad69a (patch) | |
tree | fad68212b21643c20a99eb3bc016298636bbbe93 /source/blender/editors/space_file | |
parent | 2e9105cc964a157458663fa8102601e3d6ac90e3 (diff) |
Fix for previous commit, sorry for the noise.
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index f0180c3c841..f6175bea1f4 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -1102,7 +1102,7 @@ static void filelist_from_library(struct FileList *filelist) } filelist->numfiles = nnames + 1; - filelist->filelist = malloc(filelist->numfiles * sizeof(*filelist->filelist)); + filelist->filelist = MEM_mallocN(filelist->numfiles * sizeof(*filelist->filelist), __func__); memset(filelist->filelist, 0, filelist->numfiles * sizeof(*filelist->filelist)); filelist->filelist[0].relname = BLI_strdup(FILENAME_PARENT); @@ -1173,7 +1173,7 @@ static void filelist_from_main(struct FileList *filelist) #else filelist->numfiles = 23; #endif - filelist->filelist = (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry)); + filelist->filelist = (struct direntry *)MEM_mallocN(filelist->numfiles * sizeof(struct direntry), __func__); for (a = 0; a < filelist->numfiles; a++) { memset(&(filelist->filelist[a]), 0, sizeof(struct direntry)); @@ -1227,7 +1227,7 @@ static void filelist_from_main(struct FileList *filelist) /* XXXXX TODO: if databrowse F4 or append/link filelist->hide_parent has to be set */ if (!filelist->filter_data.hide_parent) filelist->numfiles += 1; - filelist->filelist = filelist->numfiles > 0 ? (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry)) : NULL; + filelist->filelist = filelist->numfiles > 0 ? (struct direntry *)MEM_mallocN(filelist->numfiles * sizeof(struct direntry), __func__) : NULL; files = filelist->filelist; |