Commit f8611ae1 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/avio: Check av_opt_copy() for failure

Fixes: CID1477416 Unchecked return value
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 36a3a505
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment