avformat/hlsenc: fix memleak of filename

CID: 1452445
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
pull/321/head^2
Steven Liu 6 years ago
parent 4ba82ecc12
commit 80d2a7f5c6
  1. 3
      libavformat/hlsenc.c

@ -2579,9 +2579,8 @@ static int hls_write_trailer(struct AVFormatContext *s)
vs->size = range_length; vs->size = range_length;
hlsenc_io_close(s, &vs->out, filename); hlsenc_io_close(s, &vs->out, filename);
av_free(filename);
failed: failed:
av_free(filename);
av_write_trailer(oc); av_write_trailer(oc);
if (oc->url[0]) { if (oc->url[0]) {
proto = avio_find_protocol_name(oc->url); proto = avio_find_protocol_name(oc->url);

Loading…
Cancel
Save