On Sun, Apr 16, 2017 at 11:00:25PM -0700, Junio C Hamano wrote: > > diff --git a/builtin/replace.c b/builtin/replace.c > > index f83e7b8fc..065515bab 100644 > > --- a/builtin/replace.c > > +++ b/builtin/replace.c > > @@ -93,26 +93,31 @@ typedef int (*each_replace_name_fn)(const char *name, const char *ref, > > static int for_each_replace_name(const char **argv, each_replace_name_fn fn) > [...] > > Don't we need to strbuf_release(&ref) before leaving this function? Yes, good catch. Squashable patch is below. I'm not sure how I missed that one. I double-checked the other hunks in the patch and they are all fine. diff --git a/builtin/replace.c b/builtin/replace.c index 065515bab..ab17668f4 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; }