Skip to content

Commit

Permalink
Reset global variable to NULL after free'ing resource
Browse files Browse the repository at this point in the history
  • Loading branch information
scunz committed Dec 18, 2012
1 parent e62171e commit 26290cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests-clar/network/remotes.c
Expand Up @@ -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));
Expand Down

0 comments on commit 26290cd

Please sign in to comment.