Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martin Nieto <cmn@elego.de>2012-06-28 14:05:49 +0400
committerCarlos Martin Nieto <cmn@elego.de>2012-06-28 14:10:33 +0400
commit1d8943c640bad4425b8578aae6f680fa8e513bc7 (patch)
tree1449d930980d07f5c7a1c12d1f9b0c63b41ba4ab /src/pack.c
parent1de44c24936ecf39915913ddf26f68f78c7963d3 (diff)
mwindow: allow memory-window files to deregister
Once a file is registered, there is no way to deregister it, even after the structure that contains it is no longer needed and has been freed. This may be the source of #624. Allow and use the deregister function to remove our file from the global list.
Diffstat (limited to 'src/pack.c')
-rw-r--r--src/pack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pack.c b/src/pack.c
index 9b5e0e18f..808ceb70c 100644
--- a/src/pack.c
+++ b/src/pack.c
@@ -535,6 +535,7 @@ void packfile_free(struct git_pack_file *p)
/* clear_delta_base_cache(); */
git_mwindow_free_all(&p->mwf);
+ git_mwindow_file_deregister(&p->mwf);
if (p->mwf.fd != -1)
p_close(p->mwf.fd);