aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-09-06 15:32:43 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-09-06 15:32:43 +0200
commita83047308196e3e54716a39dd85c0a08b198d6bd (patch)
tree83d0c12c597f1b426c0c6b843763a64560c0a12a /resolv/resolv_conf.c
parentresolv: Fix memory leak with OOM during resolv.conf parsing [BZ #22095] (diff)
downloadglibc-a83047308196e3e54716a39dd85c0a08b198d6bd.tar.gz
glibc-a83047308196e3e54716a39dd85c0a08b198d6bd.tar.bz2
glibc-a83047308196e3e54716a39dd85c0a08b198d6bd.zip
resolv: __resolv_conf_attach must not free passed conf object [BZ #22096]
Diffstat (limited to 'resolv/resolv_conf.c')
-rw-r--r--resolv/resolv_conf.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/resolv/resolv_conf.c b/resolv/resolv_conf.c
index f391d30c27..e0f296d02e 100644
--- a/resolv/resolv_conf.c
+++ b/resolv/resolv_conf.c
@@ -600,10 +600,7 @@ __resolv_conf_attach (struct __res_state *resp, struct resolv_conf *conf)
struct resolv_conf_global *global_copy = get_locked_global ();
if (global_copy == NULL)
- {
- free (conf);
- return false;
- }
+ return false;
/* Try to find an unused index in the array. */
size_t index;