diff options
author | Jim Meyering <meyering@redhat.com> | 2009-06-07 13:55:43 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-06-07 13:58:24 +0200 |
commit | f9a950b87f996c7f66b5a09e94662cfc9d35bc6d (patch) | |
tree | aa3b6800b24db8a641be7d15ea6f1bb5f1e0ee4e | |
parent | 5424a74725030c7ddb89e3104e3c730c310379d1 (diff) | |
download | coreutils-f9a950b87f996c7f66b5a09e94662cfc9d35bc6d.tar.xz |
sort: die immediately upon heap allocation failure
* src/sort.c (register_proc): Handle hash_insert failure.
-rw-r--r-- | src/sort.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sort.c b/src/sort.c index 8438c0506..d571ddf02 100644 --- a/src/sort.c +++ b/src/sort.c @@ -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 (); } } |