Skip to content

Commit b9cb077

Browse files
richardweinbergergitster
authored andcommitted
Fix uninitialized variable in get_refs_via_rsync().
This fixes a crash when cloning via rsync://. Signed-off-by: Richard Weinberger <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 88d50e7 commit b9cb077

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static const char *rsync_url(const char *url)
143143
static struct ref *get_refs_via_rsync(struct transport *transport, int for_push)
144144
{
145145
struct strbuf buf = STRBUF_INIT, temp_dir = STRBUF_INIT;
146-
struct ref dummy, *tail = &dummy;
146+
struct ref dummy = {0}, *tail = &dummy;
147147
struct child_process rsync;
148148
const char *args[5];
149149
int temp_dir_len;

0 commit comments

Comments
 (0)