mirror of https://git.ffmpeg.org/ffmpeg.git
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->swr = swr_alloc();
|
||||
if (!aresample->swr)
|
||||
return AVERROR(ENOMEM);
|
||||
if (!aresample->swr) {
|
||||
ret = AVERROR(ENOMEM);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (args) {
|
||||
char *ptr=argd, *token;
|
||||
|
|
Loading…
Reference in New Issue