summaryrefslogtreecommitdiffstats
path: root/daemon.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-01-05 23:01:31 +0100
committerJunio C Hamano <gitster@pobox.com>2022-01-05 23:01:31 +0100
commit9afe4d9f6bccec15e7ae9d4e8ba5f700e86e08a7 (patch)
treeec1de636e84775689a185947fb9fd07a1da10b0e /daemon.c
parentMerge branch 'rs/pcre2-utf' (diff)
parentdaemon: plug memory leak on overlong path (diff)
downloadgit-9afe4d9f6bccec15e7ae9d4e8ba5f700e86e08a7.tar.xz
git-9afe4d9f6bccec15e7ae9d4e8ba5f700e86e08a7.zip
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;