From a71bcd1a7f66e210971c44452dc4cdae7bdbd98a Mon Sep 17 00:00:00 2001 From: Etienne Buira Date: Wed, 8 Jun 2011 02:20:53 +0200 Subject: [PATCH] crypto: Use av_freep instead of av_free MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a potential double free. Signed-off-by: Martin Storsjö --- libavformat/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/crypto.c b/libavformat/crypto.c index 789a4d1e76..5e7ee1eba3 100644 --- a/libavformat/crypto.c +++ b/libavformat/crypto.c @@ -97,8 +97,8 @@ static int crypto_open(URLContext *h, const char *uri, int flags) return 0; err: - av_free(c->key); - av_free(c->iv); + av_freep(&c->key); + av_freep(&c->iv); return ret; }