Git development
 help / color / mirror / Atom feed
* [PATCH] builtin-clone.c: no need to strdup for setenv
@ 2009-04-01 11:22 Ali Gholami Rudi
  0 siblings, 0 replies; only message in thread
From: Ali Gholami Rudi @ 2009-04-01 11:22 UTC (permalink / raw)
  To: git

The setenv function makes a copy, itself.

Signed-off-by: Ali Gholami Rudi <ali@rudi.ir>
---
 builtin-clone.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/builtin-clone.c b/builtin-clone.c
index 0031b5f..28d15bb 100644
--- a/builtin-clone.c
+++ b/builtin-clone.c
@@ -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);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-01 11:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-01 11:22 [PATCH] builtin-clone.c: no need to strdup for setenv Ali Gholami Rudi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox