avformat/assenc: Use av_freep() to avoid leaving stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-12-15 15:43:42 +01:00
parent 51b193214d
commit 89f0feadc2

View File

@ -84,7 +84,7 @@ static void purge_dialogues(AVFormatContext *s, int force)
avio_printf(s->pb, "Dialogue: %s\r\n", dialogue->line);
if (dialogue == ass->last_added_dialogue)
ass->last_added_dialogue = next;
av_free(dialogue->line);
av_freep(&dialogue->line);
av_free(dialogue);
if (next)
next->prev = NULL;