transport/http: do not return success if we failed to get a scheme Otherwise we return a NULL context, which will get dereferenced in apply_credentials.
diff --git a/src/transports/http.c b/src/transports/http.c
index ea3e57a..bc3ab18 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -142,7 +142,7 @@ static int auth_context_match(
}
if (!scheme)
- return 0;
+ return -1;
/* See if authentication has already started for this scheme */
git_vector_foreach(&t->auth_contexts, i, c) {