diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-11 16:48:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-11 16:48:25 +0200 |
commit | 9ba2484ece532ccca30efba28cab71596a18427d (patch) | |
tree | e0842b56028107309c38cad7ffab1ff7054c0859 | |
parent | 7457da3698c641212bb921cfb0aa0e7853fdda48 (diff) | |
download | ffmpeg-9ba2484ece532ccca30efba28cab71596a18427d.tar.gz |
af_aresample: fix leak on alloc failure
Fixes CID733798
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavfilter/af_aresample.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c index f0ccb5fcf8..e400e1f0bb 100644 --- a/libavfilter/af_aresample.c +++ b/libavfilter/af_aresample.c @@ -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; |