Commit 957a3e36046a9e58d0e6c0ab943da2b58a36c4ba

Vicent Martí 2012-12-18T12:07:13

Merge pull request #1156 from scunz/another_testcrash Reset global variable to NULL after free'ing resource

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/tests-clar/network/remotes.c b/tests-clar/network/remotes.c
index b2ed8e7..4324cb7 100644
--- a/tests-clar/network/remotes.c
+++ b/tests-clar/network/remotes.c
@@ -105,6 +105,7 @@ void test_network_remotes__set_pushspec(void)
 void test_network_remotes__save(void)
 {
 	git_remote_free(_remote);
+	_remote = NULL;
 
 	/* Set up the remote and save it to config */
 	cl_git_pass(git_remote_new(&_remote, _repo, "upstream", "git://github.com/libgit2/libgit2", NULL));