sort: die immediately upon heap allocation failure

* src/sort.c (register_proc): Handle hash_insert failure.
This commit is contained in:
Jim Meyering committed 2009-06-07 13:58:24 +02:00
1 parent 5424a74725
commit f9a950b87f
1 file changed
+2 -1
+2 -1
View File
@@ -650,7 +650,8 @@ register_proc (pid_t pid)
node->pid = pid;
node->state = ALIVE;
node->count = 1;
hash_insert (proctab, node);
if (hash_insert (proctab, node) == NULL)
xalloc_die ();
}
}