Skip to content

Commit 6cb7966

Browse files
committed
clone: free connect opts
1 parent 8eadeed commit 6cb7966

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/libgit2/clone.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ static int clone_into(
447447

448448
cleanup:
449449
git_remote_free(remote);
450+
git_remote_connect_options_dispose(&connect_opts);
450451
git_str_dispose(&reflog_message);
451452

452453
return error;

src/libgit2/remote.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "refspec.h"
1818
#include "vector.h"
1919
#include "net.h"
20+
#include "proxy.h"
2021

2122
#define GIT_REMOTE_ORIGIN "origin"
2223

@@ -89,4 +90,11 @@ GIT_INLINE(int) git_remote_connect_options__from_push_opts(
8990

9091
#undef git_remote_connect_options__copy_opts
9192

93+
GIT_INLINE(void) git_remote_connect_options__dispose(
94+
git_remote_connect_options *opts)
95+
{
96+
git_proxy_options_dispose(&opts->proxy_opts);
97+
git_strarray_dispose(&opts->custom_headers);
98+
}
99+
92100
#endif

0 commit comments

Comments
 (0)