Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-02-09 23:38:57 +0300
committerBastien Montagne <bastien@blender.org>2021-02-09 23:38:57 +0300
commit87c75767b3b4bba8b6cd6b147dbd475d9154e0ae (patch)
tree6aa562d14d06e38bf325fa0b67c6dd65240bd7bd /source/blender/blenkernel/intern/main.c
parent510db9512fc64d1739ee427f69d8674fbc7ca629 (diff)
Fixed (unreported) memleak in recent BMain relations new code.
Forgot to free the GHash iterator.
Diffstat (limited to 'source/blender/blenkernel/intern/main.c')
-rw-r--r--source/blender/blenkernel/intern/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/main.c b/source/blender/blenkernel/intern/main.c
index d5cbcb62af2..6f94b3355fa 100644
--- a/source/blender/blenkernel/intern/main.c
+++ b/source/blender/blenkernel/intern/main.c
@@ -317,7 +317,9 @@ void BKE_main_relations_tag_set(struct Main *bmain,
if (bmain->relations == NULL) {
return;
}
- for (GHashIterator *gh_iter = BLI_ghashIterator_new(bmain->relations->relations_from_pointers);
+
+ GHashIterator *gh_iter;
+ for (gh_iter = BLI_ghashIterator_new(bmain->relations->relations_from_pointers);
!BLI_ghashIterator_done(gh_iter);
BLI_ghashIterator_step(gh_iter)) {
MainIDRelationsEntry *entry = BLI_ghashIterator_getValue(gh_iter);
@@ -328,6 +330,7 @@ void BKE_main_relations_tag_set(struct Main *bmain,
entry->tags &= ~tag;
}
}
+ BLI_ghashIterator_free(gh_iter);
}
/**