diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-07-01 23:14:29 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-07-01 23:14:29 +0300 |
commit | b7b5c23b80b57b4b2d939e679ec6fc15aa8b8315 (patch) | |
tree | 71652a2524738518d58deee7968a2eab06866044 /source/blender/sequencer/intern/iterator.c | |
parent | 519c12da4162a42ed0ce2e41db45be21632ab446 (diff) |
Fix memory leak in VSE transform code
SeqCollection wasn't freed.
It wasn't easy to find culprit so added argument to
SEQ_collection_create() to pass function name.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D11746
Diffstat (limited to 'source/blender/sequencer/intern/iterator.c')
-rw-r--r-- | source/blender/sequencer/intern/iterator.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/sequencer/intern/iterator.c b/source/blender/sequencer/intern/iterator.c index 0754d9b38ed..20a2ee3b183 100644 --- a/source/blender/sequencer/intern/iterator.c +++ b/source/blender/sequencer/intern/iterator.c @@ -106,9 +106,9 @@ void SEQ_collection_free(SeqCollection *collection) * * \return empty strip collection. */ -SeqCollection *SEQ_collection_create(void) +SeqCollection *SEQ_collection_create(const char *name) { - SeqCollection *collection = MEM_callocN(sizeof(SeqCollection), "SeqCollection"); + SeqCollection *collection = MEM_callocN(sizeof(SeqCollection), name); collection->set = BLI_gset_new( BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "SeqCollection GSet"); return collection; @@ -136,7 +136,7 @@ SeqCollection *SEQ_query_by_reference(Sequence *seq_reference, ListBase *seqbase, SeqCollection *collection)) { - SeqCollection *collection = SEQ_collection_create(); + SeqCollection *collection = SEQ_collection_create(__func__); seq_query_func(seq_reference, seqbase, collection); return collection; } @@ -223,7 +223,7 @@ void SEQ_collection_expand(ListBase *seqbase, */ SeqCollection *SEQ_query_all_strips_recursive(ListBase *seqbase) { - SeqCollection *collection = SEQ_collection_create(); + SeqCollection *collection = SEQ_collection_create(__func__); LISTBASE_FOREACH (Sequence *, seq, seqbase) { if (seq->type == SEQ_TYPE_META) { SEQ_collection_merge(collection, SEQ_query_all_strips_recursive(&seq->seqbase)); @@ -241,7 +241,7 @@ SeqCollection *SEQ_query_all_strips_recursive(ListBase *seqbase) */ SeqCollection *SEQ_query_all_strips(ListBase *seqbase) { - SeqCollection *collection = SEQ_collection_create(); + SeqCollection *collection = SEQ_collection_create(__func__); LISTBASE_FOREACH (Sequence *, seq, seqbase) { SEQ_collection_append_strip(seq, collection); } @@ -256,7 +256,7 @@ SeqCollection *SEQ_query_all_strips(ListBase *seqbase) */ SeqCollection *SEQ_query_selected_strips(ListBase *seqbase) { - SeqCollection *collection = SEQ_collection_create(); + SeqCollection *collection = SEQ_collection_create(__func__); LISTBASE_FOREACH (Sequence *, seq, seqbase) { if ((seq->flag & SELECT) == 0) { continue; |