[Bf-blender-cvs] [b488988ab10] master: Fix potential memory leak in Sequencer sound strip creation code.

Bastien Montagne noreply at git.blender.org
Thu Jun 15 15:49:13 CEST 2017


Commit: b488988ab10a5f78d5cefe8346fc2fd2f1232d0f
Author: Bastien Montagne
Date:   Thu Jun 15 12:32:27 2017 +0200
Branches: master
https://developer.blender.org/rBb488988ab10a5f78d5cefe8346fc2fd2f1232d0f

Fix potential memory leak in Sequencer sound strip creation code.

===================================================================

M	source/blender/blenkernel/intern/sequencer.c

===================================================================

diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 757f639775b..dbdffa54d29 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -5183,6 +5183,7 @@ Sequence *BKE_sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoad
 	sound = BKE_sound_new_file(bmain, seq_load->path); /* handles relative paths */
 
 	if (sound->playback_handle == NULL) {
+		BKE_libblock_free(bmain, sound);
 #if 0
 		if (op)
 			BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");




More information about the Bf-blender-cvs mailing list