diff options
author | Tomas Paladin Volf <volftomas@users.noreply.github.com> | 2015-04-30 15:10:28 +0200 |
---|---|---|
committer | Tomas Paladin Volf <volftomas@users.noreply.github.com> | 2015-04-30 15:10:28 +0200 |
commit | 9bff15f4a4e5e71d2c62747e826147f67ee7bd25 (patch) | |
tree | 9c724d756d5aed9f04b9e44a69e60f3466dffb7a | |
parent | 891cc5045f613955c6f766f1875a024483b3b972 (diff) | |
download | libgit2-9bff15f4a4e5e71d2c62747e826147f67ee7bd25.tar.gz |
Added call to git_libgit2_shutdown()
Added forgotten call to git_libgit2_shutdown() to the /examples/network/git2.c.
-rw-r--r-- | examples/network/git2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/network/git2.c b/examples/network/git2.c index d44334b85..1daff62ff 100644 --- a/examples/network/git2.c +++ b/examples/network/git2.c @@ -23,6 +23,8 @@ static int run_command(git_cb fn, int argc, char **argv) int error; git_repository *repo; + git_libgit2_init(); + // Before running the actual command, create an instance of the local // repository and pass it to the function. @@ -42,6 +44,8 @@ static int run_command(git_cb fn, int argc, char **argv) if(repo) git_repository_free(repo); + git_libgit2_shutdown(); + return !!error; } @@ -54,8 +58,6 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } - git_libgit2_init(); - for (i = 0; commands[i].name != NULL; ++i) { if (!strcmp(argv[1], commands[i].name)) return run_command(commands[i].fn, --argc, ++argv); |