42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
From d265b6129184dd94da600187b67cef9125bc58c7 Mon Sep 17 00:00:00 2001
|
|
From: Florian Weimer <fweimer@redhat.com>
|
|
Date: Wed, 6 Sep 2017 11:25:14 +0200
|
|
Subject: [PATCH 32] __libc_dynarray_emplace_enlarge: Add missing else
|
|
|
|
Before, arrays of small elements received a starting allocation size of
|
|
8, not 16.
|
|
---
|
|
ChangeLog | 5 +++++
|
|
malloc/dynarray_emplace_enlarge.c | 2 +-
|
|
2 files changed, 6 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/ChangeLog b/ChangeLog
|
|
index e98a4bbf3c..f82fd1f97d 100644
|
|
--- a/ChangeLog
|
|
+++ b/ChangeLog
|
|
@@ -1,5 +1,10 @@
|
|
2017-09-06 Florian Weimer <fweimer@redhat.com>
|
|
|
|
+ * malloc/dynarray_emplace_enlarge.c
|
|
+ (__libc_dynarray_emplace_enlarge): Add missing else.
|
|
+
|
|
+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.
|
|
diff --git a/malloc/dynarray_emplace_enlarge.c b/malloc/dynarray_emplace_enlarge.c
|
|
index dfc70017ce..09cd09268b 100644
|
|
--- a/malloc/dynarray_emplace_enlarge.c
|
|
+++ b/malloc/dynarray_emplace_enlarge.c
|
|
@@ -32,7 +32,7 @@ __libc_dynarray_emplace_enlarge (struct dynarray_header *list,
|
|
size. */
|
|
if (element_size < 4)
|
|
new_allocated = 16;
|
|
- if (element_size < 8)
|
|
+ else if (element_size < 8)
|
|
new_allocated = 8;
|
|
else
|
|
new_allocated = 4;
|
|
|