netops: don't try to free addrinfo on DNS error Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
diff --git a/src/netops.c b/src/netops.c
index dadc2bc..3e6b935 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -102,6 +102,7 @@ int gitno_connect(const char *host, const char *port)
ret = getaddrinfo(host, port, &hints, &info);
if (ret != 0) {
error = GIT_EOSERR;
+ info = NULL;
goto cleanup;
}