mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-04-17 20:46:31 +00:00
crypto: fix potential double free
This commit is contained in:
parent
1e9b302690
commit
7d89f7cbf3
@ -97,8 +97,8 @@ static int crypto_open(URLContext *h, const char *uri, int flags)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
err:
|
err:
|
||||||
av_free(c->key);
|
av_freep(c->key);
|
||||||
av_free(c->iv);
|
av_freep(c->iv);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,8 +157,6 @@ static int crypto_close(URLContext *h)
|
|||||||
if (c->hd)
|
if (c->hd)
|
||||||
ffurl_close(c->hd);
|
ffurl_close(c->hd);
|
||||||
av_freep(&c->aes);
|
av_freep(&c->aes);
|
||||||
av_freep(&c->key);
|
|
||||||
av_freep(&c->iv);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user