]> Pileus Git - ~andy/git/commitdiff
Fix uninitialized variable in get_refs_via_rsync().
authorRichard Weinberger <richard@nod.at>
Thu, 14 Jan 2010 23:28:59 +0000 (00:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 16 Jan 2010 05:20:28 +0000 (21:20 -0800)
This fixes a crash when cloning via rsync://.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport.c

index 7362ec09b2cbc6752489286a8280c16d3519f163..42b2c59a7bdf68464ea508a75dc02fe75517bcce 100644 (file)
@@ -143,7 +143,7 @@ static const char *rsync_url(const char *url)
 static struct ref *get_refs_via_rsync(struct transport *transport, int for_push)
 {
        struct strbuf buf = STRBUF_INIT, temp_dir = STRBUF_INIT;
-       struct ref dummy, *tail = &dummy;
+       struct ref dummy = {0}, *tail = &dummy;
        struct child_process rsync;
        const char *args[5];
        int temp_dir_len;