]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Remove unneeded setting of errno after malloc failure
authorAndreas Schwab <schwab@suse.de>
Thu, 17 May 2018 11:04:46 +0000 (13:04 +0200)
committerAndreas Schwab <schwab@suse.de>
Thu, 17 May 2018 13:47:25 +0000 (15:47 +0200)
The errno value has alread been set by malloc.

ChangeLog
resolv/res_send.c

index fc31a45396ede6a6e09189a544810aa1da7054a8..066c21343779851c1b45a2b3bd54772539b2705c 100644 (file)
--- 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
index 9e9541789b2e6eab77d7aaf083c61a8d73948072..947ebf5212d470ed49e8ad153cc64273849d79d8 100644 (file)
@@ -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;
        }