Browse Source

avformat/hlsenc: fix filename memleak in hls_write_packet

Signed-off-by: Steven Liu <liuqi05@kuaishou.com>
tags/n4.3
Steven Liu 5 years ago
parent
commit
76eaca43be
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/hlsenc.c

+ 2
- 0
libavformat/hlsenc.c View File

@@ -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;
}


Loading…
Cancel
Save