summaryrefslogtreecommitdiff
path: root/send-pack.c
diff options
context:
space:
mode:
authorJonas Fonseca <fonseca@diku.dk>2006-09-01 00:32:39 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-31 16:24:39 -0700
commit2d7320d0b09d7a9aab4e5dbc5458f37bfb6ce9f5 (patch)
tree4fac98b5cb3155365498f5750f9550be977660ed /send-pack.c
parentef1186228d39af29c109785fa752e3866c79a6b3 (diff)
downloadgit-2d7320d0b09d7a9aab4e5dbc5458f37bfb6ce9f5.tar.gz
Use xmalloc instead of malloc
Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/send-pack.c b/send-pack.c
index fd79a61923..ac4501d341 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -53,7 +53,7 @@ static void exec_rev_list(struct ref *refs)
if (900 < i)
die("git-rev-list environment overflow");
if (!is_zero_sha1(ref->new_sha1)) {
- char *buf = malloc(100);
+ char *buf = xmalloc(100);
args[i++] = buf;
snprintf(buf, 50, "%s", sha1_to_hex(ref->new_sha1));
buf += 50;
@@ -75,7 +75,7 @@ static void exec_rev_list(struct ref *refs)
if (is_zero_sha1(ref->new_sha1) &&
!is_zero_sha1(ref->old_sha1) &&
has_sha1_file(ref->old_sha1)) {
- char *buf = malloc(42);
+ char *buf = xmalloc(42);
args[i++] = buf;
snprintf(buf, 42, "^%s", sha1_to_hex(ref->old_sha1));
}