Commit 8d7dcb10f2f997efcd4aac27b2e2684c7e35d063

Carlos Martín Nieto 2017-09-27T15:27:32

curl: free the proxy options

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/curl_stream.c b/src/curl_stream.c
index 4e0455c..33f5c88 100644
--- a/src/curl_stream.c
+++ b/src/curl_stream.c
@@ -193,6 +193,7 @@ static int curls_set_proxy(git_stream *stream, const git_proxy_options *proxy_op
 	CURLcode res;
 	curl_stream *s = (curl_stream *) stream;
 
+	git_proxy_options_free(&s->proxy);
 	if ((error = git_proxy_options_dup(&s->proxy, proxy_opts)) < 0)
 		return error;
 
@@ -293,6 +294,7 @@ static void curls_free(git_stream *stream)
 
 	curls_close(stream);
 	git_strarray_free(&s->cert_info_strings);
+	git_proxy_options_free(&s->proxy);
 	git__free(s);
 }