summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Buira <etienne.buira.lists@free.fr>2011-06-08 02:20:53 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-08 02:20:53 +0200
commit7d89f7cbf3ccd98f9a5f58db97effa9afd2d571a (patch)
treea8677c756401a342d3791112971270d820bb5b9f
parent1e9b3026908e556d1a2b6afb76d48df9272f8f95 (diff)
crypto: fix potential double free
-rw-r--r--libavformat/crypto.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/crypto.c b/libavformat/crypto.c
index 789a4d1e76..03bfeddba4 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;
}
@@ -157,8 +157,6 @@ static int crypto_close(URLContext *h)
if (c->hd)
ffurl_close(c->hd);
av_freep(&c->aes);
- av_freep(&c->key);
- av_freep(&c->iv);
return 0;
}