aboutsummaryrefslogtreecommitdiff
path: root/transport-helper.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2011-09-15 23:10:37 +0200
committerJunio C Hamano <gitster@pobox.com>2011-10-05 13:45:31 -0700
commitc28cce55e0ea1d674ccc89cadadac0bfef511384 (patch)
tree4a17b9becf814a1d212d6d283e010b688d082414 /transport-helper.c
parent313fb010da4343eca22ee48a2cc18048d999de53 (diff)
downloadgit-c28cce55e0ea1d674ccc89cadadac0bfef511384.tar.gz
git-c28cce55e0ea1d674ccc89cadadac0bfef511384.tar.xz
remote: use xstrdup() instead of strdup()
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport-helper.c')
-rw-r--r--transport-helper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/transport-helper.c b/transport-helper.c
index 4eab844d4..07131261f 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -183,7 +183,7 @@ static struct child_process *get_helper(struct transport *transport)
ALLOC_GROW(refspecs,
refspec_nr + 1,
refspec_alloc);
- refspecs[refspec_nr++] = strdup(capname + strlen("refspec "));
+ refspecs[refspec_nr++] = xstrdup(capname + strlen("refspec "));
} else if (!strcmp(capname, "connect")) {
data->connect = 1;
} else if (!prefixcmp(capname, "export-marks ")) {
@@ -445,7 +445,7 @@ static int fetch_with_import(struct transport *transport,
if (data->refspecs)
private = apply_refspecs(data->refspecs, data->refspec_nr, posn->name);
else
- private = strdup(posn->name);
+ private = xstrdup(posn->name);
read_ref(private, posn->old_sha1);
free(private);
}