unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob c1502c56c79f0cd5fbac74a3ea3894798def6d7c 1903 bytes (raw)
name: gnu/packages/patches/glibc-2-26-0006.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
 
From 302434688d925134065498b4a5574f6ee6bfb9fd Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 10 Aug 2017 09:10:36 +0200
Subject: [PATCH 06/90] nss: Call __resolv_context_put before early return in
 get*_r [BZ #21932]

This corrects an oversight introduced in commit
352f4ff9a268b81ef5d4b2413f582565806e4790 (resolv: Introduce struct
resolv_context).

(cherry picked from commit 3016149819268b14660f791b971910ccc2cc13e5)

diff --git a/ChangeLog b/ChangeLog
index 459062cc20..3127648626 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-08-09  Florian Weimer  <fweimer@redhat.com>
+
+	[BZ #21932]
+	* nss/getXXbyYY_r.c (REENTRANT_NAME): Call __resolv_context_put
+	before early return.
+
 2017-08-09  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
 	[BZ #21780]
diff --git a/NEWS b/NEWS
index 9a64579658..ec6cf34122 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ Version 2.26.1
 The following bugs are resolved with this release:
 
   [21885] getaddrinfo: Release resolver context on error in gethosts
+  [21932] Unpaired __resolv_context_get in generic get*_r implementation
 \f
 Version 2.26
 
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 6c547ea1ca..bce80e05dd 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -234,6 +234,9 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
 				      H_ERRNO_VAR_P))
     {
     case -1:
+# ifdef NEED__RES
+      __resolv_context_put (res_ctx);
+# endif
       return errno;
     case 1:
 #ifdef NEED_H_ERRNO
@@ -253,7 +256,12 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
       nscd_status = NSCD_NAME (ADD_VARIABLES, resbuf, buffer, buflen, result
 			       H_ERRNO_VAR);
       if (nscd_status >= 0)
-	return nscd_status;
+	{
+# ifdef NEED__RES
+	  __resolv_context_put (res_ctx);
+# endif
+	  return nscd_status;
+	}
     }
 #endif
 

debug log:

solving c1502c56c ...
found c1502c56c 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-0006.patch b/gnu/packages/patches/glibc-2-26-0006.patch
new file mode 100644
index 000000000..c1502c56c

1:31: trailing whitespace.
 
1:32: space before tab in indent.
 	[BZ #21780]
1:39: trailing whitespace.
 
1:44: trailing whitespace.
 
1:50: space before tab in indent.
 				      H_ERRNO_VAR_P))
Checking patch gnu/packages/patches/glibc-2-26-0006.patch...
Applied patch gnu/packages/patches/glibc-2-26-0006.patch cleanly.
warning: squelched 3 whitespace errors
warning: 8 lines add whitespace errors.

skipping https://yhetil.org/guix-patches/87d148pe57.fsf@fastmail.com/ for c1502c56c
index at:
100644 c1502c56c79f0cd5fbac74a3ea3894798def6d7c	gnu/packages/patches/glibc-2-26-0006.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).