avformat/hlsenc: fix filename memleak in hls_write_packet
Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
This commit is contained in:
parent
e684d07ac6
commit
76eaca43be
@ -2442,6 +2442,7 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_log(s, hls->ignore_io_errors ? AV_LOG_WARNING : AV_LOG_ERROR,
|
av_log(s, hls->ignore_io_errors ? AV_LOG_WARNING : AV_LOG_ERROR,
|
||||||
"Failed to open file '%s'\n", filename);
|
"Failed to open file '%s'\n", filename);
|
||||||
|
av_freep(&filename);
|
||||||
av_dict_free(&options);
|
av_dict_free(&options);
|
||||||
return hls->ignore_io_errors ? 0 : ret;
|
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);
|
ret = flush_dynbuf(vs, &range_length);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
av_freep(&filename);
|
||||||
av_dict_free(&options);
|
av_dict_free(&options);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user