mbox series

[0/3] setup: add `clear_repository_format()`

Message ID 20181218072528.3870492-1-martin.agren@gmail.com (mailing list archive)
Headers show
Series setup: add `clear_repository_format()` | expand

Message

Martin Ågren Dec. 18, 2018, 7:25 a.m. UTC
Patch 3 adds `clear_repository_format()` to plug a few memory leaks
related to `struct repository_format`. In preparation for that, patch 2
tightens up some code which uses a possibly-undefined value from the
struct. Patch 1 drops a return value that no-one has ever used.

Cc-ing Peff, who introduced `struct repository_format`, and brian, who
introduced its `hash_algo` field (see patch 2).

Martin Ågren (3):
  setup: drop return value from `read_repository_format()`
  setup: do not use invalid `repository_format`
  setup: add `clear_repository_format()`

 cache.h      | 13 +++++++++----
 repository.c |  1 +
 setup.c      | 19 ++++++++++++++++---
 3 files changed, 26 insertions(+), 7 deletions(-)