diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-07-28 22:30:41 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-28 22:30:41 +0400 |
commit | ad524f834a9acaaaceeb846d00ea609f79333a3d (patch) | |
tree | 2b6a49037e48602c34dea27d19e0668ed8c35724 /builtin/receive-pack.c | |
parent | 919eb8acea61fc461e69e2383e6290b4c3991c96 (diff) | |
parent | 31bb6d37f992128eca3707d4f58ec61425742e81 (diff) |
Merge branch 'jk/misc-fixes-maint'
* jk/misc-fixes-maint:
apply: avoid possible bogus pointer
fix memory leak parsing core.commentchar
transport: fix leaks in refs_from_alternate_cb
free ref string returned by dwim_ref
receive-pack: don't copy "dir" parameter
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r-- | builtin/receive-pack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 92561bffc1..f93ac454b4 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -1122,7 +1122,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) int advertise_refs = 0; int stateless_rpc = 0; int i; - char *dir = NULL; + const char *dir = NULL; struct command *commands; struct sha1_array shallow = SHA1_ARRAY_INIT; struct sha1_array ref = SHA1_ARRAY_INIT; @@ -1157,7 +1157,7 @@ int cmd_receive_pack(int argc, const char **argv, const char *prefix) } if (dir) usage(receive_pack_usage); - dir = xstrdup(arg); + dir = arg; } if (!dir) usage(receive_pack_usage); |