config: don't implicitly use gitdir or commondir
[gitweb.git] / builtin / replace.c
index 065515bababe99ad04249065822584a3f2a0af69..905b1759a4ae4f6819770c832c0b28b7e5fde086 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include "cache.h"
+#include "config.h"
 #include "builtin.h"
 #include "refs.h"
 #include "parse-options.h"
@@ -120,6 +121,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;
 }