summaryrefslogtreecommitdiff
path: root/libavformat/crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/crypto.c')
-rw-r--r--libavformat/crypto.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/crypto.c b/libavformat/crypto.c
index 9a48f2e6f5..31f9ac0ab9 100644
--- a/libavformat/crypto.c
+++ b/libavformat/crypto.c
@@ -385,8 +385,7 @@ static int crypto_close(URLContext *h)
ret = ffurl_write(c->hd, out_buf, BLOCKSIZE);
}
- if (c->hd)
- ffurl_close(c->hd);
+ ffurl_closep(&c->hd);
av_freep(&c->aes_decrypt);
av_freep(&c->aes_encrypt);
av_freep(&c->write_buf);