fix memleak bug, when all the process is normal,
just free old_filename

Signed-off-by: Steven Liu <l...@chinaffmpeg.org>
---
 libavformat/hlsenc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 221089c..d62d5b8 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1559,6 +1559,8 @@ static int hls_write_packet(AVFormatContext *s, AVPacket 
*pkt)
             av_free(old_filename);
             return ret;
         }
+
+        av_free(old_filename);
     }
 
     ret = ff_write_chained(oc, stream_index, pkt, s, 0);
-- 
1.7.1




_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to