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>2017-04-18 07:56:54 +0300
committerJunio C Hamano <gitster@pobox.com>2017-04-18 07:56:54 +0300
commit372b050b6bd4bd3256e6fa21ab0fef47dd768d98 (patch)
treefa12cbf34a720297cd8227b5ce129c041a6db4bb /builtin/replace.c
parent6a97da396470cb85e289a4810326fd7f50062b96 (diff)
replace: plug a memory leak
Recent update to for_each_replace_name() to make it use a strbuf in place of a fixed buffer forgot to release the memory held by the strbuf before leaving the function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/replace.c')
-rw-r--r--builtin/replace.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/replace.c b/builtin/replace.c
index 065515baba..ab17668f43 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -120,6 +120,7 @@ static int for_each_replace_name(const char **argv, each_replace_name_fn fn)
if (fn(full_hex, ref.buf, &oid))
had_error = 1;
}
+ strbuf_release(&ref);
return had_error;
}