summaryrefslogtreecommitdiff
path: root/src/libgit2/remote.c
diff options
context:
space:
mode:
authoryuangli <yuangli@mathworks.com>2022-08-02 14:35:27 +0100
committeryuangli <yuangli@mathworks.com>2022-08-02 14:35:27 +0100
commite93d0815a8de2806667851e31dbd06578db00f95 (patch)
tree5923315954baccff1c0b4315c2b531c26cca8324 /src/libgit2/remote.c
parent4536477ee1f884501717b3a4a67da3bc4974e7f8 (diff)
downloadlibgit2-e93d0815a8de2806667851e31dbd06578db00f95.tar.gz
attempt to fix nego.shallowarray memory leak
Diffstat (limited to 'src/libgit2/remote.c')
-rw-r--r--src/libgit2/remote.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libgit2/remote.c b/src/libgit2/remote.c
index 02d271d7d..c3d3af530 100644
--- a/src/libgit2/remote.c
+++ b/src/libgit2/remote.c
@@ -22,6 +22,7 @@
#include "git2/types.h"
#include "git2/oid.h"
#include "git2/net.h"
+#include "transports/smart.h"
#define CONFIG_URL_FMT "remote.%s.url"
#define CONFIG_PUSHURL_FMT "remote.%s.pushurl"
@@ -2163,6 +2164,8 @@ void git_remote_free(git_remote *remote)
free_heads(&remote->local_heads);
git_vector_free(&remote->local_heads);
+ git_shallowarray_free((remote->nego).shallow_roots);
+
git_push_free(remote->push);
git__free(remote->url);
git__free(remote->pushurl);