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

Derek Buitenhuis derek.buitenhuis at gmail.com
Sat Dec 30 18:34:28 EET 2017


On 12/30/2017 4:31 PM, Nicolas George wrote:
> 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.

I contend that checking errors should *always* be done, as a matter of
good practice, not whenever it "seems needed". Especially when it can
be a alloc failure, leading, in this case to calling:

    strncmp((const char *)NULL, http_version_opt, "1.1", 3)

if it fails.

- Derek


More information about the ffmpeg-devel mailing list