diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-03-05 01:17:59 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-03-05 02:05:26 +0200 |
commit | f335b42c72fbc4842295f52b0654a8c54716847d (patch) | |
tree | 04c074aad8e4f512131c26b71ebddda83a4bf06e /src/blob.c | |
parent | e06dd9b6d650008c1b0731dea2de5dea1884fd28 (diff) | |
download | libgit2-f335b42c72fbc4842295f52b0654a8c54716847d.tar.gz |
Fix segmentation fault when freeing a repository
Disable garbage collection of cross-references to prevent
double-freeing. Internal reference management is now done
with a separate method.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/blob.c')
-rw-r--r-- | src/blob.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blob.c b/src/blob.c index f271cc7f6..a9e765b40 100644 --- a/src/blob.c +++ b/src/blob.c @@ -132,7 +132,7 @@ int git_blob_writefile(git_oid *written_id, git_repository *repo, const char *pa /* FIXME: maybe we don't want to free this already? * the user may want to access it again */ - git_object_close((git_object *)blob); + GIT_OBJECT_DECREF(repo, blob); return GIT_SUCCESS; } |