aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2018-05-17 13:04:46 +0200
committerAndreas Schwab <schwab@suse.de>2018-05-17 15:47:25 +0200
commitdae6c43c33ed2d29d6d7089958ad707759a48517 (patch)
treef72f6b486d1021277ab386868e239a6f3bc17394
parent0068c08588389c4586f0481455bb2af9b44cee4e (diff)
downloadglibc-dae6c43c33ed2d29d6d7089958ad707759a48517.zip
glibc-dae6c43c33ed2d29d6d7089958ad707759a48517.tar.gz
glibc-dae6c43c33ed2d29d6d7089958ad707759a48517.tar.bz2
Remove unneeded setting of errno after malloc failure
The errno value has alread been set by malloc.
-rw-r--r--ChangeLog5
-rw-r--r--resolv/res_send.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index fc31a45..066c213 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-05-17 Andreas Schwab <schwab@suse.de>
+
+ * resolv/res_send.c (__res_context_send): Don't set errno when
+ returing error after malloc failure.
+
2018-05-17 H.J. Lu <hongjiu.lu@intel.com>
* nptl/allocatestack.c (allocate_stack): Remove the
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 9e95417..947ebf5 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -472,10 +472,7 @@ __res_context_send (struct resolv_context *ctx,
sizeof (struct sockaddr_in6)
- sizeof (struct sockaddr_in));
else
- {
- __set_errno (ENOMEM);
- return -1;
- }
+ return -1;
}
EXT(statp).nscount = statp->nscount;
}