ostree/dump: Fix a memory leak
authorPhilip Withnall <withnall@endlessm.com>
Mon, 10 Aug 2020 11:07:22 +0000 (12:07 +0100)
committerPhilip Withnall <pwithnall@endlessos.org>
Thu, 1 Oct 2020 10:06:56 +0000 (11:06 +0100)
commit23bdc4e5df41a1f53ce387f90eaf6b79c644b2da
tree1978fd698199dbe5d6a697b4ff9488979036b59b
parent8d09a1a8eaaedcc8fb1fc111a61616e9f7ad9a4e
ostree/dump: Fix a memory leak

Re-using the `refs` variable for the main list of refs, plus the
iterated lists, meant that the main list was never freed (although all
the iterated ones were freed correctly).

Fix this by using two variables rather than reusing the one.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
src/ostree/ot-dump.c