diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-02-28 16:54:13 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-03-03 20:23:52 +0200 |
commit | 971c90befe4dfac4c235fa59d65f7e652fc27e1d (patch) | |
tree | bb150c614f2e395bfaee4ab89a5088dfc63778bd | |
parent | 48c27f86bbe9678c7e01a90a2cec7a30327b0e90 (diff) | |
download | libgit2-971c90befe4dfac4c235fa59d65f7e652fc27e1d.tar.gz |
Do not free the index if it's owned by a repository
Signed-off-by: Vicent Marti <tanoku@gmail.com>
-rw-r--r-- | src/index.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c index 46bbafd3f..95e56b7d5 100644 --- a/src/index.c +++ b/src/index.c @@ -166,7 +166,7 @@ int git_index_open_inrepo(git_index **index_out, git_repository *repo) void git_index_free(git_index *index) { - if (index == NULL) + if (index == NULL || index->repository != NULL) return; git_index_clear(index); |