Fix potential memory leak in Sequencer sound strip creation code.
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 15 Jun 2017 10:32:27 +0000 (12:32 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 15 Jun 2017 10:32:27 +0000 (12:32 +0200)
source/blender/blenkernel/intern/sequencer.c

index 757f639775b6e2d5a47a236a2f6cde39e0ad5346..dbdffa54d29af2b45f6766af2bc9aefe2592e1b9 100644 (file)
@@ -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");