From: Liu Yubao Date: Fri, 15 Sep 2006 20:46:07 +0000 (-0700) Subject: Fix duplicate xmalloc in builtin-add X-Git-Tag: v1.4.3-rc1~102 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d48ffdbb0b2580c6ff58da7cedbf78785ba6121b;p=git.git 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 --- diff --git a/builtin-add.c b/builtin-add.c index 0cb9c8120..febb75ed9 100644 --- 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;