summaryrefslogtreecommitdiff
path: root/libavformat/sapdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/sapdec.c')
-rw-r--r--libavformat/sapdec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/sapdec.c b/libavformat/sapdec.c
index b3644b436b..eec73aa2f4 100644
--- a/libavformat/sapdec.c
+++ b/libavformat/sapdec.c
@@ -54,8 +54,7 @@ static int sap_read_close(AVFormatContext *s)
struct SAPState *sap = s->priv_data;
if (sap->sdp_ctx)
avformat_close_input(&sap->sdp_ctx);
- if (sap->ann_fd)
- ffurl_close(sap->ann_fd);
+ ffurl_closep(&sap->ann_fd);
av_freep(&sap->sdp);
ff_network_close();
return 0;