bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] sort: die immediately upon heap allocation failure


From: Jim Meyering
Subject: [PATCH 1/2] sort: die immediately upon heap allocation failure
Date: Sun, 07 Jun 2009 14:37:55 +0200

FYI, just pushed:

>From f9a950b87f996c7f66b5a09e94662cfc9d35bc6d Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 7 Jun 2009 13:55:43 +0200
Subject: [PATCH 1/2] sort: die immediately upon heap allocation failure

* src/sort.c (register_proc): Handle hash_insert failure.
---
 src/sort.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/sort.c b/src/sort.c
index 8438c05..d571ddf 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 ();
     }
 }

--
1.6.3.2.277.gd10543


>From 523c40505cef796aefbe53337687c0103cd4cd72 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 7 Jun 2009 12:54:18 +0200
Subject: [PATCH 2/2] build: update from gnulib

* gnulib: Update submodule to latest.
---
 gnulib |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gnulib b/gnulib
index 61893df..facd248 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 61893df315d491846a8b33af7558bf3cca5410dd
+Subproject commit facd2482db60c9e08f60ecd6f004940393e1630a
--
1.6.3.2.277.gd10543.dirty




reply via email to

[Prev in Thread] Current Thread [Next in Thread]