unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 121954b94088f1f3afe43e5edf72907b5eb6d14d 1630 bytes (raw)
name: gnu/packages/patches/glibc-2-26-0031.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
 
From 27233446a62ca35ce0b54566279a99a6774d4210 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Wed, 6 Sep 2017 15:47:27 +0200
Subject: [PATCH 31/90] resolv: __resolv_conf_attach must not free passed conf
 object [BZ #22096]

(cherry picked from commit a83047308196e3e54716a39dd85c0a08b198d6bd)

diff --git a/ChangeLog b/ChangeLog
index ef2041b9e5..e98a4bbf3c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-06  Florian Weimer  <fweimer@redhat.com>
+
+	[BZ #22096]
+	* resolv/resolv_conf.c (__resolv_conf_attach): Do not free conf in
+	case of failure to obtain the global conf object.
+
 2017-09-06  Florian Weimer  <fweimer@redhat.com>
 
 	[BZ #22095]
diff --git a/NEWS b/NEWS
index 62959274b3..9bcb176171 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,7 @@ The following bugs are resolved with this release:
   [21941] powerpc: Restrict xssqrtqp operands to Vector Registers
   [21972] assert macro requires operator== (int) for its argument type
   [22095] resolv: Fix memory leak with OOM during resolv.conf parsing
+  [22096] resolv: __resolv_conf_attach must not free passed conf object
 \f
 Version 2.26
 
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;

debug log:

solving 121954b94 ...
found 121954b94 in https://yhetil.org/guix-patches/87ine0pjiu.fsf@fastmail.com/ ||
	https://yhetil.org/guix-patches/87d148pe57.fsf@fastmail.com/

applying [1/1] https://yhetil.org/guix-patches/87ine0pjiu.fsf@fastmail.com/
diff --git a/gnu/packages/patches/glibc-2-26-0031.patch b/gnu/packages/patches/glibc-2-26-0031.patch
new file mode 100644
index 000000000..121954b94

1:27: trailing whitespace.
 
1:28: space before tab in indent.
 	[BZ #22095]
1:40: trailing whitespace.
 
1:46: trailing whitespace.
 
1:54: trailing whitespace.
 
Checking patch gnu/packages/patches/glibc-2-26-0031.patch...
Applied patch gnu/packages/patches/glibc-2-26-0031.patch cleanly.
warning: 5 lines add whitespace errors.

skipping https://yhetil.org/guix-patches/87d148pe57.fsf@fastmail.com/ for 121954b94
index at:
100644 121954b94088f1f3afe43e5edf72907b5eb6d14d	gnu/packages/patches/glibc-2-26-0031.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).