Merge branch 'ma/leakplugs'

Memory leaks in various codepaths have been plugged.

* ma/leakplugs:
  pack-bitmap[-write]: use `object_array_clear()`, don't leak
  object_array: add and use `object_array_pop()`
  object_array: use `object_array_clear()`, not `free()`
  leak_pending: use `object_array_clear()`, not `free()`
  commit: fix memory leak in `reduce_heads()`
  builtin/commit: fix memory leak in `prepare_index()`
This commit is contained in:
Junio C Hamano
2017-09-29 11:23:43 +09:00
17 changed files with 75 additions and 35 deletions

View File

@ -888,7 +888,7 @@ static void receive_needs(void)
}
shallow_nr += shallows.nr;
free(shallows.objects);
object_array_clear(&shallows);
}
/* return non-zero if the ref is hidden, otherwise 0 */