Created
May 16, 2011 18:15
-
-
Save jflatow/974989 to your computer and use it in GitHub Desktop.
gitlib2:git_index_free memory leak minimal example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <git2.h> | |
int | |
main(int argc, char **argv) { | |
git_repository *repo; | |
git_index *index; | |
int error = git_repository_open(&repo, ".git"); | |
printf("%s\n", error ? git_strerror(error) : "opened repo"); | |
error = git_repository_index(&index, repo); | |
printf("%s\n", error ? git_strerror(error) : "success"); | |
git_repository_free(repo); | |
git_index_free(index); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment