[FFmpeg-devel] [PATCH] avformat/hls: release mem resource to fix memleak

Nicolas George george at nsup.org
Sat Dec 30 18:31:35 EET 2017


Derek Buitenhuis (2017-12-30):
> On 12/30/2017 12:42 PM, Steven Liu wrote:
> >          av_opt_get(v->input, "http_version", AV_OPT_SEARCH_CHILDREN, &http_version_opt);
> >          c->http_multiple = http_version_opt && strncmp((const char *)http_version_opt, "1.1", 3) == 0;
> > +        av_free(http_version_opt);
> 
> Looks OK, but the return value for av_opt_get should also be checked. It can
> fail with, for example, AVERROR(ENOMEM).

Does it really matter? If av_opt_get() fails for any reason,
http_multiple will just be false, which would let the processing
continue, only in a slightly degraded manner that was the norm a few
months ago.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171230/d8a7fcd0/attachment.sig>


More information about the ffmpeg-devel mailing list