Skip to content

Commit

Permalink
Fix duplicate xmalloc in builtin-add
Browse files Browse the repository at this point in the history
[jc: patch came without sign-off but it was too obvious and trivial.]

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Liu Yubao authored and Junio C Hamano committed Sep 15, 2006
1 parent fc2b2be commit d48ffdb
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion builtin-add.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d48ffdb

Please sign in to comment.