diff options
Diffstat (limited to 'builtin/pack-redundant.c')
-rw-r--r-- | builtin/pack-redundant.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c index d0532f66b1..cb1df1c761 100644 --- a/builtin/pack-redundant.c +++ b/builtin/pack-redundant.c @@ -53,7 +53,7 @@ static inline struct llist_item *llist_item_get(void) free_nodes = free_nodes->next; } else { int i = 1; - new = xmalloc(sizeof(struct llist_item) * BLKSIZE); + ALLOC_ARRAY(new, BLKSIZE); for (; i < BLKSIZE; i++) llist_item_put(&new[i]); } @@ -442,6 +442,7 @@ static void minimize(struct pack_list **min) /* return if there are no objects missing from the unique set */ if (missing->size == 0) { *min = unique; + free(missing); return; } |