Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
replace: plug a memory leak
author
Junio C Hamano
<gitster@pobox.com>
Tue, 18 Apr 2017 04:56:54 +0000
(21:56 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 18 Apr 2017 04:56:54 +0000
(21:56 -0700)
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>
builtin/replace.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
6a97da3
)
diff --git
a/builtin/replace.c
b/builtin/replace.c
index 065515bababe99ad04249065822584a3f2a0af69..ab17668f4330a5e688d423a60c138768b9955e1b 100644
(file)
--- 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;
}