summaryrefslogtreecommitdiff
path: root/src/proxy.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2017-09-27 15:17:26 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2017-09-27 15:27:30 +0200
commit44527f5c338320a2ddbd0fab81a635dfcb2adb90 (patch)
tree5689f91fd66372e254046d539f10d483f5120ef4 /src/proxy.c
parent524c1d3c9eef1f63d058ca5d4a61af7d5588ebfb (diff)
downloadlibgit2-44527f5c338320a2ddbd0fab81a635dfcb2adb90.tar.gz
proxy: add a free function for the options's pointers
When we duplicate a user-provided options struct, we're stuck with freeing the url in it. In case we add stuff to the proxy struct, let's add a function in which to put the logic.
Diffstat (limited to 'src/proxy.c')
-rw-r--r--src/proxy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/proxy.c b/src/proxy.c
index b07371d48..524147c3c 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -31,3 +31,9 @@ int git_proxy_options_dup(git_proxy_options *tgt, const git_proxy_options *src)
return 0;
}
+
+void git_proxy_options_free(git_proxy_options *opts)
+{
+ git__free((char *) opts->url);
+ opts->url = NULL;
+}