Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-01-06 01:01:31 +0300
committerJunio C Hamano <gitster@pobox.com>2022-01-06 01:01:31 +0300
commit9afe4d9f6bccec15e7ae9d4e8ba5f700e86e08a7 (patch)
treeec1de636e84775689a185947fb9fd07a1da10b0e /daemon.c
parentc91b0b7c7270dac8c539062d193749e654b7f002 (diff)
parent999bba3e0bbb2e81a3e1b2bdb5846479d1e663ad (diff)
Merge branch 'rs/daemon-plug-leak'
Plug a memory leak. * rs/daemon-plug-leak: daemon: plug memory leak on overlong path
Diffstat (limited to 'daemon.c')
-rw-r--r--daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon.c b/daemon.c
index 4a000ee4af..94a5b8a364 100644
--- a/daemon.c
+++ b/daemon.c
@@ -232,13 +232,13 @@ static const char *path_ok(const char *directory, struct hostinfo *hi)
rlen = strlcpy(interp_path, expanded_path.buf,
sizeof(interp_path));
+ strbuf_release(&expanded_path);
if (rlen >= sizeof(interp_path)) {
logerror("interpolated path too large: %s",
interp_path);
return NULL;
}
- strbuf_release(&expanded_path);
loginfo("Interpolated dir '%s'", interp_path);
dir = interp_path;