summaryrefslogtreecommitdiff
path: root/builtin-push.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-push.c')
-rw-r--r--builtin-push.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-push.c b/builtin-push.c
index 5df66081a6..5633f0ade4 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;