* sunrpc/svc_run.c (svc_run): Fail instead of segfaulting if
	malloc crashed.
This commit is contained in:
Jakub Jelinek 2007-01-12 16:59:03 +00:00
parent c8fe889a43
commit dcfbf36aae
2 changed files with 12 additions and 0 deletions

View File

@ -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

View 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;