From: James Bowes Date: Mon, 26 Mar 2007 00:39:36 +0000 (-0400) Subject: use xmalloc in git.c and help.c X-Git-Tag: v1.5.1-rc2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3301521a2584128c23cae14bebbe260326dbcedf;p=git.git use xmalloc in git.c and help.c Signed-off-by: James Bowes Signed-off-by: Junio C Hamano --- diff --git a/git.c b/git.c index ed1c65e30..5b1bc2a89 100644 --- a/git.c +++ b/git.c @@ -99,7 +99,7 @@ static int split_cmdline(char *cmdline, const char ***argv) int src, dst, count = 0, size = 16; char quoted = 0; - *argv = malloc(sizeof(char*) * size); + *argv = xmalloc(sizeof(char*) * size); /* split alias_string */ (*argv)[count++] = cmdline; diff --git a/help.c b/help.c index 0893fea02..be8651a73 100644 --- a/help.c +++ b/help.c @@ -58,7 +58,7 @@ static void add_cmdname(const char *name, int len) if (!cmdname) oom(); } - ent = malloc(sizeof(*ent) + len); + ent = xmalloc(sizeof(*ent) + len); if (!ent) oom(); ent->len = len;