Commit 9ba2484e authored by Michael Niedermayer's avatar Michael Niedermayer

af_aresample: fix leak on alloc failure

Fixes CID733798
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7457da36
......@@ -49,8 +49,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
aresample->next_pts = AV_NOPTS_VALUE;
aresample->swr = swr_alloc();
if (!aresample->swr)
return AVERROR(ENOMEM);
if (!aresample->swr) {
ret = AVERROR(ENOMEM);
goto end;
}
if (args) {
char *ptr=argd, *token;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment