diff options
author | Josh Allmann <joshua.allmann@gmail.com> | 2018-01-23 16:49:16 -0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-01-25 20:42:39 +0100 |
commit | ee88f31d34c848fd95daf12bdf054b7228efdf14 (patch) | |
tree | 07457500dc7f7c2587edd1cf0bcd908923ac12ac /libavformat/rtmpproto.c | |
parent | 4dbae00bac7af0b35622feb5ac78d29ac16889fd (diff) | |
download | ffmpeg-ee88f31d34c848fd95daf12bdf054b7228efdf14.tar.gz |
libavformat/rtmpproto: Plug leak if sending bytes read report fails.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r-- | libavformat/rtmpproto.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index faf2a6f244..b741e421af 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2431,8 +2431,10 @@ static int get_packet(URLContext *s, int for_header) rt->bytes_read += ret; if (rt->bytes_read - rt->last_bytes_read > rt->receive_report_size) { av_log(s, AV_LOG_DEBUG, "Sending bytes read report\n"); - if ((ret = gen_bytes_read(s, rt, rpkt.timestamp + 1)) < 0) + if ((ret = gen_bytes_read(s, rt, rpkt.timestamp + 1)) < 0) { + ff_rtmp_packet_destroy(&rpkt); return ret; + } rt->last_bytes_read = rt->bytes_read; } |