From 5187b609ba203b5a62e3e54c1a323cc0647deff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Fri, 7 Mar 2014 14:58:43 +0100 Subject: [PATCH] local transport: catch double-opens Combinations of connect + fetch can call local_open multiple times. Detect this and skip the initialization stage. --- src/transports/local.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/transports/local.c b/src/transports/local.c index 26ada48e6..f8d511ed6 100644 --- a/src/transports/local.c +++ b/src/transports/local.c @@ -194,6 +194,9 @@ static int local_connect( GIT_UNUSED(cred_acquire_cb); GIT_UNUSED(cred_acquire_payload); + if (t->connected) + return 0; + t->url = git__strdup(url); GITERR_CHECK_ALLOC(t->url); t->direction = direction;