aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mmst.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-04-03 17:03:38 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-25 13:11:36 +0200
commit82bf41f3abce4a13e7c6ad1606eb708f371de87f (patch)
treea76e1dc947a8b2db0dbf821d5c8fcc5e61269a52 /libavformat/mmst.c
parentaf97c9865fe7a48b223e162eabce21cc180f305c (diff)
downloadffmpeg-82bf41f3abce4a13e7c6ad1606eb708f371de87f.tar.gz
avformat: Replace ffurl_close() by ffurl_closep() where appropriate
It avoids leaving dangling pointers behind in memory. Also remove redundant checks for whether the URLContext to be closed is already NULL. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/mmst.c')
-rw-r--r--libavformat/mmst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mmst.c b/libavformat/mmst.c
index 533cbe7698..377323fe27 100644
--- a/libavformat/mmst.c
+++ b/libavformat/mmst.c
@@ -473,7 +473,7 @@ static int mms_close(URLContext *h)
MMSContext *mms = &mmst->mms;
if(mms->mms_hd) {
send_close_packet(mmst);
- ffurl_close(mms->mms_hd);
+ ffurl_closep(&mms->mms_hd);
}
/* free all separately allocated pointers in mms */