Fix #121621: Memory leak with new node description

Error in 6176e66636
The description wasn't copied to new node trees, and it wasn't freed.
This commit is contained in:
Hans Goudey
2024-05-09 09:28:00 -04:00
parent 7970915dc9
commit be0b08f6f8

View File

@@ -268,6 +268,8 @@ static void ntree_copy_data(Main * /*bmain*/,
else {
BKE_previewimg_id_copy(&ntree_dst->id, &ntree_src->id);
}
ntree_dst->description = BLI_strdup_null(ntree_src->description);
}
static void ntree_free_data(ID *id)
@@ -316,6 +318,7 @@ static void ntree_free_data(ID *id)
MEM_freeN(ntree->nested_node_refs);
}
MEM_SAFE_FREE(ntree->description);
BKE_previewimg_free(&ntree->preview);
MEM_delete(ntree->runtime);
}