Commit 805253d5155091691f7cf36e54134cc87b2ea91a

Christian Weisgerber 2022-03-07T20:19:35

fix level of indirection ok stsp

diff --git a/lib/dial.c b/lib/dial.c
index 2e29508..096f032 100644
--- a/lib/dial.c
+++ b/lib/dial.c
@@ -90,7 +90,7 @@ got_dial_parse_uri(char **proto, char **host, char **port,
 	if (!p) {
 		/* Try parsing Git's "scp" style URL syntax. */
 		*proto = strdup("ssh");
-		if (proto == NULL) {
+		if (*proto == NULL) {
 			err = got_error_from_errno("strdup");
 			goto done;
 		}
@@ -118,7 +118,7 @@ got_dial_parse_uri(char **proto, char **host, char **port,
 		p = q + 1;
 	} else {
 		*proto = strndup(uri, p - uri);
-		if (proto == NULL) {
+		if (*proto == NULL) {
 			err = got_error_from_errno("strndup");
 			goto done;
 		}