mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
sort: die immediately upon heap allocation failure
* src/sort.c (register_proc): Handle hash_insert failure.
This commit is contained in:
1 parent
5424a74725
commit
f9a950b87f
1 file changed
+2
-1
+2
-1
@@ -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 ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user