Fix memory leak when opening file browser
The name string of each file was duplicated but not freed. The new flag to
ensure the file-list frees the name wasn't set. Mistake in ca475479eb
.
This commit is contained in:
parent
bbe6d44928
commit
3469e06c1a
|
@ -1954,7 +1954,13 @@ static FileDirEntry *filelist_file_create_entry(FileList *filelist, const int in
|
|||
|
||||
ret->entry = rev;
|
||||
ret->relpath = BLI_strdup(entry->relpath);
|
||||
ret->name = entry->free_name ? BLI_strdup(entry->name) : entry->name;
|
||||
if (entry->free_name) {
|
||||
ret->name = BLI_strdup(entry->name);
|
||||
ret->flags |= FILE_ENTRY_NAME_FREE;
|
||||
}
|
||||
else {
|
||||
ret->name = entry->name;
|
||||
}
|
||||
ret->description = BLI_strdupcat(filelist->filelist.root, entry->relpath);
|
||||
memcpy(ret->uuid, entry->uuid, sizeof(ret->uuid));
|
||||
ret->blentype = entry->blentype;
|
||||
|
|
Loading…
Reference in New Issue