Browse code

crypto: Use av_freep instead of av_free

This fixes a potential double free.

Signed-off-by: Martin Storsjö <martin@martin.st>

Etienne Buira authored on 2011/06/08 09:20:53
Showing 1 changed files
... ...
@@ -97,8 +97,8 @@ static int crypto_open(URLContext *h, const char *uri, int flags)
97 97
 
98 98
     return 0;
99 99
 err:
100
-    av_free(c->key);
101
-    av_free(c->iv);
100
+    av_freep(&c->key);
101
+    av_freep(&c->iv);
102 102
     return ret;
103 103
 }
104 104