diff --git a/builtin-push.c b/builtin-push.c index 5df66081a..5633f0ade 100644 --- a/builtin-push.c +++ b/builtin-push.c @@ -52,7 +52,7 @@ static void set_refspecs(const char **refs, int nr) } else if (deleterefs && !strchr(ref, ':')) { char *delref; int len = strlen(ref)+1; - delref = xmalloc(len); + delref = xmalloc(len+1); strcpy(delref, ":"); strcat(delref, ref); ref = delref;