Commit 24384700d2105bf37b705c6b8e85626b60a28f10

Carlos Martín Nieto 2011-09-06T21:44:13

netops: don't try to free addrinfo on DNS error Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>

1
2
3
4
5
6
7
8
9
10
11
12
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;
 	}