aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-11 16:48:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-11 16:48:25 +0200
commit9ba2484ece532ccca30efba28cab71596a18427d (patch)
treee0842b56028107309c38cad7ffab1ff7054c0859
parent7457da3698c641212bb921cfb0aa0e7853fdda48 (diff)
downloadffmpeg-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.c6
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;