Commit d48ffdbb authored by Liu Yubao's avatar Liu Yubao Committed by Junio C Hamano

Fix duplicate xmalloc in builtin-add

[jc: patch came without sign-off but it was too obvious and trivial.]
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent fc2b2be0
......@@ -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;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment