Message ID | 20210520212549.15466-3-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | f8611ae1efc47fbe1aff140c89bee4fd1d62d3e1 |
Headers | show |
Series | [FFmpeg-devel,1/3] avformat/moflex: Initialize format | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
On Thu, May 20, 2021 at 11:25:49PM +0200, Michael Niedermayer wrote: > Fixes: CID1477416 Unchecked return value > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavformat/avio.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) will apply [...]
diff --git a/libavformat/avio.c b/libavformat/avio.c index 2974f4b2b4..6be6f9bf97 100644 --- a/libavformat/avio.c +++ b/libavformat/avio.c @@ -313,8 +313,11 @@ int ffurl_open_whitelist(URLContext **puc, const char *filename, int flags, int ret = ffurl_alloc(puc, filename, flags, int_cb); if (ret < 0) return ret; - if (parent) - av_opt_copy(*puc, parent); + if (parent) { + ret = av_opt_copy(*puc, parent); + if (ret < 0) + goto fail; + } if (options && (ret = av_opt_set_dict(*puc, options)) < 0) goto fail;
Fixes: CID1477416 Unchecked return value Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavformat/avio.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)