[FFmpeg-cvslog] af_aresample: fix leak on alloc failure
Michael Niedermayer
git at videolan.org
Thu Oct 11 16:55:44 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 11 16:48:25 2012 +0200| [9ba2484ece532ccca30efba28cab71596a18427d] | committer: Michael Niedermayer
af_aresample: fix leak on alloc failure
Fixes CID733798
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9ba2484ece532ccca30efba28cab71596a18427d
---
libavfilter/af_aresample.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c
index f0ccb5f..e400e1f 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;
More information about the ffmpeg-cvslog
mailing list