Merge branch 'fa/merge-recursive-no-rename'
[gitweb.git] / builtin / check-ref-format.c
index fd915d59841ecc1098e2d8a4356947215377d4da..eac499450f63554387fb8b32ef5780c32ded4a21 100644 (file)
@@ -20,7 +20,7 @@ static const char builtin_check_ref_format_usage[] =
  */
 static char *collapse_slashes(const char *refname)
 {
-       char *ret = xmalloc(strlen(refname) + 1);
+       char *ret = xmallocz(strlen(refname));
        char ch;
        char prev = '/';
        char *cp = ret;