Commit 76eaca43 authored by Steven Liu's avatar Steven Liu

avformat/hlsenc: fix filename memleak in hls_write_packet

Signed-off-by: 's avatarSteven Liu <liuqi05@kuaishou.com>
parent e684d07a
......@@ -2442,6 +2442,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
if (ret < 0) {
av_log(s, hls->ignore_io_errors ? AV_LOG_WARNING : AV_LOG_ERROR,
"Failed to open file '%s'\n", filename);
av_freep(&filename);
av_dict_free(&options);
return hls->ignore_io_errors ? 0 : ret;
}
......@@ -2450,6 +2451,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
}
ret = flush_dynbuf(vs, &range_length);
if (ret < 0) {
av_freep(&filename);
av_dict_free(&options);
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment