File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
generate/templates/manual/repository Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ void GitRepository::GetReferencesWorker::Execute()
7979 baton->out ->push_back (reference);
8080 }
8181 }
82+
83+ git_strarray_free (&reference_names);
8284}
8385
8486void GitRepository::GetReferencesWorker::HandleErrorCallback () {
Original file line number Diff line number Diff line change @@ -29,11 +29,7 @@ void GitRepository::GetRemotesWorker::Execute()
2929{
3030 giterr_clear ();
3131
32- git_repository *repo;
33- {
34- nodegit::LockMaster lockMaster (true , baton->repo );
35- baton->error_code = git_repository_open (&repo, git_repository_workdir (baton->repo ));
36- }
32+ git_repository *repo = baton->repo ;
3733
3834 if (baton->error_code != GIT_OK) {
3935 if (giterr_last () != NULL ) {
@@ -52,7 +48,6 @@ void GitRepository::GetRemotesWorker::Execute()
5248 baton->error = git_error_dup (giterr_last ());
5349 }
5450
55- git_repository_free (repo);
5651 delete baton->out ;
5752 baton->out = NULL ;
5853 return ;
@@ -76,7 +71,6 @@ void GitRepository::GetRemotesWorker::Execute()
7671 }
7772
7873 git_strarray_free (&remote_names);
79- git_repository_free (repo);
8074 delete baton->out ;
8175 baton->out = NULL ;
8276 return ;
@@ -86,7 +80,6 @@ void GitRepository::GetRemotesWorker::Execute()
8680 }
8781
8882 git_strarray_free (&remote_names);
89- git_repository_free (repo);
9083}
9184
9285void GitRepository::GetRemotesWorker::HandleErrorCallback () {
You can’t perform that action at this time.
0 commit comments