Using av_freep is generally good practice.
Signed-off-by: Martin Storsjö <martin@martin.st>
| ... | ... |
@@ -153,9 +153,9 @@ static int crypto_close(URLContext *h) |
| 153 | 153 |
CryptoContext *c = h->priv_data; |
| 154 | 154 |
if (c->hd) |
| 155 | 155 |
ffurl_close(c->hd); |
| 156 |
- av_free(c->aes); |
|
| 157 |
- av_free(c->key); |
|
| 158 |
- av_free(c->iv); |
|
| 156 |
+ av_freep(&c->aes); |
|
| 157 |
+ av_freep(&c->key); |
|
| 158 |
+ av_freep(&c->iv); |
|
| 159 | 159 |
return 0; |
| 160 | 160 |
} |
| 161 | 161 |
|