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

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


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).

- Derek


More information about the ffmpeg-devel mailing list