Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15
STALE3730d

[PATCH] use xrealloc in help.c

From: James Bowes <hidden>
Date: 2016-06-15 22:43:01
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: James Bowes <redacted>
---
 help.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/help.c b/help.c
index be8651a..34b1dda 100644
--- a/help.c
+++ b/help.c
@@ -54,7 +54,7 @@ static void add_cmdname(const char *name, int len)
 	struct cmdname *ent;
 	if (cmdname_alloc <= cmdname_cnt) {
 		cmdname_alloc = cmdname_alloc + 200;
-		cmdname = realloc(cmdname, cmdname_alloc * sizeof(*cmdname));
+		cmdname = xrealloc(cmdname, cmdname_alloc * sizeof(*cmdname));
 		if (!cmdname)
 			oom();
 	}
-- 
1.5.0.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help