[FFmpeg-devel] [PATCH] avformat/hls: release mem resource to fix memleak
ffmpeg at tmm1.net
Sun Dec 31 07:21:41 EET 2017
On Sat, Dec 30, 2017 at 2:14 PM Derek Buitenhuis <derek.buitenhuis at gmail.com>
> On 12/30/2017 5:50 PM, Aman Gupta wrote:
> > There is already a check in place to prevent strncmp from being called
> > NULL.
> The point before still holds.
> Are people really arguing against consistent use of error checking?
> standards of error checking are how bugs and security issues happen.
I really don't think it makes any sense in this case, since it is expected
that the av_opt_get will fail on non-http io contexts. It doesn't matter if
the failure is due to AVERROR_OPTION_NOT_FOUND or AVERROR(ENOMEM). The only
thing that matters is whether http_version_opt is set or remains NULL.
Anyway, I don't feel strongly about this. If you think the extra
instructions to store and compare the return value make this code cleaner
or more secure, so be it. I will send a patch with the requested changes.
> - Derek
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel