My Various Git Projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a81b9f
)
use xmalloc in git.c and help.c
author
James Bowes
<jbowes@dangerouslyinc.com>
Mon, 26 Mar 2007 00:39:36 +0000
(20:39 -0400)
committer
Junio C Hamano
<junkio@cox.net>
Mon, 26 Mar 2007 01:00:23 +0000
(18:00 -0700)
Signed-off-by: James Bowes <jbowes@dangerouslyinc.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git.c
patch
|
blob
|
history
help.c
patch
|
blob
|
history
diff --git
a/git.c
b/git.c
index
ed1c65e
..
5b1bc2a
100644
(file)
--- 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 =
x
malloc(sizeof(char*) * size);
/* split alias_string */
(*argv)[count++] = cmdline;
diff --git
a/help.c
b/help.c
index
0893fea
..
be8651a
100644
(file)
--- 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 =
x
malloc(sizeof(*ent) + len);
if (!ent)
oom();
ent->len = len;