OSDN Git Service
(root)
/
git-core
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc2b2be
)
Fix duplicate xmalloc in builtin-add
author
Liu Yubao
<yubao.liu@gmail.com>
Fri, 15 Sep 2006 20:46:07 +0000
(13:46 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Fri, 15 Sep 2006 20:46:07 +0000
(13:46 -0700)
[jc: patch came without sign-off but it was too obvious and trivial.]
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-add.c
patch
|
blob
|
history
diff --git
a/builtin-add.c
b/builtin-add.c
index
0cb9c81
..
febb75e
100644
(file)
--- a/
builtin-add.c
+++ b/
builtin-add.c
@@
-70,7
+70,6
@@
static void fill_directory(struct dir_struct *dir, const char **pathspec)
base = "";
if (baselen) {
char *common = xmalloc(baselen + 1);
- common = xmalloc(baselen + 1);
memcpy(common, *pathspec, baselen);
common[baselen] = 0;
path = base = common;