summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar James Bowes <jbowes@dangerouslyinc.com>2007-03-25 20:39:36 -0400
committerLibravatar Junio C Hamano <junkio@cox.net>2007-03-25 18:00:23 -0700
commit3301521a2584128c23cae14bebbe260326dbcedf (patch)
tree33d433fdbe47f09d56459fd8dfcac336de686a60
parentMerge branch 'jc/fpl' (diff)
downloadtgif-3301521a2584128c23cae14bebbe260326dbcedf.tar.xz
use xmalloc in git.c and help.c
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--git.c2
-rw-r--r--help.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/git.c b/git.c
index ed1c65e309..5b1bc2a895 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 0893fea025..be8651a739 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;