af_aresample: fix leak on alloc failure
Fixes CID733798 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
7457da3698
commit
9ba2484ece
@ -49,8 +49,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
|
|||||||
|
|
||||||
aresample->next_pts = AV_NOPTS_VALUE;
|
aresample->next_pts = AV_NOPTS_VALUE;
|
||||||
aresample->swr = swr_alloc();
|
aresample->swr = swr_alloc();
|
||||||
if (!aresample->swr)
|
if (!aresample->swr) {
|
||||||
return AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
if (args) {
|
if (args) {
|
||||||
char *ptr=argd, *token;
|
char *ptr=argd, *token;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user