Fix T92681: resolve use of freed filedescriptor in debug builds
Ref D13053
This commit is contained in:
parent
2a4dfaa0e9
commit
3df587b798
Notes:
blender-bot
2023-02-14 11:00:17 +01:00
Referenced by issue #92681, File descriptor used after closing the file.
|
@ -1351,7 +1351,6 @@ FileData *blo_filedata_from_memfile(MemFile *memfile,
|
|||
void blo_filedata_free(FileData *fd)
|
||||
{
|
||||
if (fd) {
|
||||
fd->file->close(fd->file);
|
||||
|
||||
/* Free all BHeadN data blocks */
|
||||
#ifndef NDEBUG
|
||||
|
@ -1365,6 +1364,7 @@ void blo_filedata_free(FileData *fd)
|
|||
MEM_freeN(new_bhead);
|
||||
}
|
||||
#endif
|
||||
fd->file->close(fd->file);
|
||||
|
||||
if (fd->filesdna) {
|
||||
DNA_sdna_free(fd->filesdna);
|
||||
|
|
Loading…
Reference in New Issue