From 5670c4ab256114e869b1df4b05653aa5f909182c Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 6 Sep 2017 15:20:25 +0200 Subject: resolv: Fix memory leak with OOM during resolv.conf parsing [BZ #22095] --- resolv/res_init.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'resolv/res_init.c') diff --git a/resolv/res_init.c b/resolv/res_init.c index fa46ce7813..4e1f9fe8de 100644 --- a/resolv/res_init.c +++ b/resolv/res_init.c @@ -446,6 +446,11 @@ res_vinit_1 (FILE *fp, struct resolv_conf_parser *parser) (&parser->nameserver_list); if (p != NULL) *p = sa; + else + { + free (sa); + return false; + } } continue; } -- cgit v1.2.3