]> git.ipfire.org Git - thirdparty/git.git/commit
list-objects-filter: correct usage of ALLOC_GROW
authorMatthew DeVore <matvore@google.com>
Fri, 31 May 2019 18:46:06 +0000 (11:46 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 31 May 2019 19:36:07 +0000 (12:36 -0700)
commit7140600e2e78f202594ebca09e3176b6fcac1625
tree1c50199217936334b1dbc27af1cfffb424e1015e
parent8b10a206f090e01ce1ac4d9a10ec769e2409e2b0
list-objects-filter: correct usage of ALLOC_GROW

In the sparse filter data, array_frame array is used in a way such that
nr is the index of the last element. Fix this so that nr is actually the
number of elements in the array.

The filter_sparse_free function also has an unaddressed TODO to free the
memory associated with the sparse filter data. Address that TODO and fix
the memory leak.

Signed-off-by: Matthew DeVore <matvore@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
list-objects-filter.c