[FFmpeg-cvslog] crypto: fix potential double free
Etienne Buira
git at videolan.org
Wed Jun 8 02:26:19 CEST 2011
ffmpeg | branch: master | Etienne Buira <etienne.buira.lists at free.fr> | Wed Jun 8 02:20:53 2011 +0200| [7d89f7cbf3ccd98f9a5f58db97effa9afd2d571a] | committer: Michael Niedermayer
crypto: fix potential double free
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7d89f7cbf3ccd98f9a5f58db97effa9afd2d571a
---
libavformat/crypto.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/libavformat/crypto.c b/libavformat/crypto.c
index 789a4d1..03bfedd 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;
}
More information about the ffmpeg-cvslog
mailing list