Commit 54b9460fee5219cb5a57118bce066697704ef3f8

Ramsay Jones 2010-04-07T20:13:56

Fix the memory leak caused by failing to free the 'offset index' Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/odb.c b/src/odb.c
index 85a843c..58840c6 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -1098,6 +1098,8 @@ static void pack_dec(git_pack *p)
 			gitfo_free_map(&p->idx_map);
 			gitfo_close(p->idx_fd);
 			free(p->im_fanout);
+			free(p->im_off_idx);
+			free(p->im_off_next);
 		}
 
 		gitlck_free(&p->lock);