Skip to content

Commit

Permalink
builtin-clone.c: no need to strdup for setenv
Browse files Browse the repository at this point in the history
The setenv function makes a copy, itself.

Signed-off-by: Ali Gholami Rudi <ali@rudi.ir>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ali Gholami Rudi authored and Junio C Hamano committed Apr 1, 2009
1 parent e161acd commit 50b5f42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-clone.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
atexit(remove_junk);
sigchain_push_common(remove_junk_on_signal);

setenv(CONFIG_ENVIRONMENT, xstrdup(mkpath("%s/config", git_dir)), 1);
setenv(CONFIG_ENVIRONMENT, mkpath("%s/config", git_dir), 1);

if (safe_create_leading_directories_const(git_dir) < 0)
die("could not create leading directories of '%s'", git_dir);
Expand Down

0 comments on commit 50b5f42

Please sign in to comment.