Commit acdc7cff2e31223aa91d9421b9b4edc53ca87869

Russell Belfer 2014-03-27T15:29:17

Fix memory leak of submodule branch name

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/submodule.c b/src/submodule.c
index 0a3762f..e1500b8 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -1126,6 +1126,7 @@ static void submodule_release(git_submodule *sm)
 		git__free(sm->path);
 	git__free(sm->name);
 	git__free(sm->url);
+	git__free(sm->branch);
 	git__memzero(sm, sizeof(*sm));
 	git__free(sm);
 }