clone: free connect opts

This commit is contained in:
Edward Thomson
2023-02-10 09:46:33 +00:00
parent 8eadeedee4
commit 6cb7966d5a
2 changed files with 9 additions and 0 deletions

View File

@@ -447,6 +447,7 @@ static int clone_into(
cleanup:
git_remote_free(remote);
git_remote_connect_options_dispose(&connect_opts);
git_str_dispose(&reflog_message);
return error;

View File

@@ -17,6 +17,7 @@
#include "refspec.h"
#include "vector.h"
#include "net.h"
#include "proxy.h"
#define GIT_REMOTE_ORIGIN "origin"
@@ -89,4 +90,11 @@ GIT_INLINE(int) git_remote_connect_options__from_push_opts(
#undef git_remote_connect_options__copy_opts
GIT_INLINE(void) git_remote_connect_options__dispose(
git_remote_connect_options *opts)
{
git_proxy_options_dispose(&opts->proxy_opts);
git_strarray_dispose(&opts->custom_headers);
}
#endif