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>
James Bowes committed
Mar 25, 2007 at 20:39 UTC
3301521a2584128c23cae14bebbe260326dbcedf
2 files changed
+2
-2
git.c
+1
-1
@@ -99,7 +99,7 @@ static int split_cmdline(char *cmdline, const char ***argv)
99
int src, dst, count = 0, size = 16;
100
char quoted = 0;
101
102
- *argv = malloc(sizeof(char*) * size);
102
+ *argv = xmalloc(sizeof(char*) * size);
103
104
/* split alias_string */
105
(*argv)[count++] = cmdline;
help.c
+1
-1
@@ -58,7 +58,7 @@ static void add_cmdname(const char *name, int len)
58
if (!cmdname)
59
oom();
60
}
61
- ent = malloc(sizeof(*ent) + len);
61
+ ent = xmalloc(sizeof(*ent) + len);
62
if (!ent)
63
oom();
64
ent->len = len;