Cleanup: Correct an own earlier commit to use an existing utility function

Didn't know this function existed, better to use it then to avoid verbosity.
This commit is contained in:
Julian Eisel 2020-12-08 15:00:31 +01:00
parent 95b3c4c966
commit 2678953f69
4 changed files with 5 additions and 5 deletions

View File

@ -148,7 +148,7 @@ bool BLO_main_validate_libraries(Main *bmain, ReportList *reports)
}
}
BLI_linklist_free(names, MEM_freeN);
BLI_linklist_freeN(names);
}
BLO_blendhandle_close(bh);

View File

@ -2621,7 +2621,7 @@ static int filelist_readjob_list_lib(const char *root, ListBase *entries, const
nbr_entries++;
}
BLI_linklist_free(names, MEM_freeN);
BLI_linklist_freeN(names);
return nbr_entries;
}

View File

@ -68,7 +68,7 @@ ImBuf *IMB_thumb_load_blend(const char *blen_path, const char *blen_group, const
printf("%s: error, found %d items, %d previews\n", __func__, nnames, nprevs);
}
BLI_linklist_free(previews, BKE_previewimg_freefunc);
BLI_linklist_free(names, MEM_freeN);
BLI_linklist_freeN(names);
return ima;
}
@ -93,7 +93,7 @@ ImBuf *IMB_thumb_load_blend(const char *blen_path, const char *blen_group, const
}
BLI_linklist_free(previews, BKE_previewimg_freefunc);
BLI_linklist_free(names, MEM_freeN);
BLI_linklist_freeN(names);
}
else {
BlendThumbnail *data;

View File

@ -227,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, MEM_freeN); /* free linklist *and* each node's data */
BLI_linklist_freeN(names); /* free linklist *and* each node's data */
}
return list;