unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 49d9d52221752995e620566f8b4a09156a98b240 1721 bytes (raw)
name: gnu/packages/patches/glibc-2-26-0001.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
 
From dc258ce62ae0bbb456c6a855dbb6b384ecf7e988 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Thu, 3 Aug 2017 13:59:17 +0200
Subject: [PATCH 01/90] getaddrinfo: Release resolver context on error in
 gethosts [BZ #21885]

(cherry picked from commit 964263bb8d650f1681665c55704fb01a8e725621)

diff --git a/ChangeLog b/ChangeLog
index 8dbfc7eaff..28ce9c8479 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-08-03  Florian Weimer  <fweimer@redhat.com>
+
+	[BZ #21885]
+	* sysdeps/posix/getaddrinfo.c (gethosts): Release resolver context
+	on memory allocation failure.
+
 2017-08-02  Siddhesh Poyarekar  <siddhesh@sourceware.org>
 
 	* version.h (RELEASE): Set to "stable"
diff --git a/NEWS b/NEWS
index 8295f20c0a..9a64579658 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,12 @@ See the end for copying conditions.
 Please send GNU C library bug reports via <http://sourceware.org/bugzilla/>
 using `glibc' in the "product" field.
 \f
+Version 2.26.1
+
+The following bugs are resolved with this release:
+
+  [21885] getaddrinfo: Release resolver context on error in gethosts
+\f
 Version 2.26
 
 Major new features:
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index efa7118498..699411cc92 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -255,6 +255,8 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req,
       break;								      \
     if (!scratch_buffer_grow (tmpbuf))					      \
       {									      \
+	__resolv_context_enable_inet6 (res_ctx, res_enable_inet6);	      \
+	__resolv_context_put (res_ctx);					      \
 	result = -EAI_MEMORY;						      \
 	goto free_and_return;						      \
       }									      \

debug log:

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

1:27: trailing whitespace.
 
1:28: space before tab in indent.
 	* version.h (RELEASE): Set to "stable"
1:44: trailing whitespace.
 
1:56: space before tab in indent.
 	result = -EAI_MEMORY;						      \
1:57: space before tab in indent.
 	goto free_and_return;						      \
Checking patch gnu/packages/patches/glibc-2-26-0001.patch...
Applied patch gnu/packages/patches/glibc-2-26-0001.patch cleanly.
warning: 5 lines add whitespace errors.

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