Commit bbcf6d65ac8203f4ec3edc715a5261ec61234539

Stefan Sperling 2018-01-17T22:33:38

plug a memory leak by freeing packidx

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/lib/pack.c b/lib/pack.c
index 32b5af0..b7ef020 100644
--- a/lib/pack.c
+++ b/lib/pack.c
@@ -490,6 +490,7 @@ got_packfile_open_object(struct got_object **obj, struct got_object_id *id,
 			goto done;
 
 		err = open_packed_object(obj, repo, path_packdir, packidx, id);
+		got_packidx_close(packidx);
 		if (err)
 			goto done;
 		if (*obj != NULL)