summaryrefslogtreecommitdiff
path: root/builtin/check-ref-format.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/check-ref-format.c')
-rw-r--r--builtin/check-ref-format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/check-ref-format.c b/builtin/check-ref-format.c
index fd915d5984..eac499450f 100644
--- a/builtin/check-ref-format.c
+++ b/builtin/check-ref-format.c
@@ -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;