@matheusbsbs / matheus-bagliano / commits / d48ffdbb0b
Fork 0

Fix duplicate xmalloc in builtin-add

[jc: patch came without sign-off but it was too obvious and trivial.] Signed-off-by: Junio C Hamano <junkio@cox.net>

Liu Yubao committed Sep 15, 2006 at 13:46 UTC d48ffdbb0b2580c6ff58da7cedbf78785ba6121b
1 file changed -1
builtin-add.c
-1
@@ -70,7 +70,6 @@ static void fill_directory(struct dir_struct *dir, const char **pathspec)
70 base = "";
71 if (baselen) {
72 char *common = xmalloc(baselen + 1);
73 - common = xmalloc(baselen + 1);
73 memcpy(common, *pathspec, baselen);
74 common[baselen] = 0;
75 path = base = common;