]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
[BZ #3559]
authorJakub Jelinek <jakub@redhat.com>
Fri, 12 Jan 2007 16:59:03 +0000 (16:59 +0000)
committerJakub Jelinek <jakub@redhat.com>
Fri, 12 Jan 2007 16:59:03 +0000 (16:59 +0000)
* sunrpc/svc_run.c (svc_run): Fail instead of segfaulting if
malloc crashed.

ChangeLog
sunrpc/svc_run.c

index d0852273c37a0792d98d3794a549e1fea0529b6f..de3ba28b3b4701ff4a65d6c2de36bfac93b64f3b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-11-27  Jakub Jelinek  <jakub@redhat.com>
+
+       [BZ #3559]
+       * sunrpc/svc_run.c (svc_run): Fail instead of segfaulting if
+       malloc crashed.
+
 2006-11-14  Jakub Jelinek  <jakub@redhat.com>
 
        * nss/nss_files/files-alias.c (get_next_alias): Set line back
index 017910b45301776d106b188a2d5bb3fcf623cbc2..d5e24dd0fc95f450a6aa8525e5c62f021c8ebcdb 100644 (file)
@@ -60,6 +60,12 @@ svc_run (void)
        return;
 
       my_pollfd = malloc (sizeof (struct pollfd) * svc_max_pollfd);
+      if (my_pollfd == NULL)
+       {
+         perror (_("svc_run: - out of memory"));
+         return;
+       }
+
       for (i = 0; i < svc_max_pollfd; ++i)
        {
          my_pollfd[i].fd = svc_pollfd[i].fd;