]> git.ipfire.org Git - thirdparty/git.git/commit - commit-reach.c
commit-reach: plug minor memory leak after using is_descendant_of()
authorRené Scharfe <l.s.r@web.de>
Fri, 19 Jun 2020 13:13:46 +0000 (15:13 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Jun 2020 18:06:01 +0000 (11:06 -0700)
commitd546fe2874ce8dc73cb0ac7541640fd202ec27c8
tree21caa4bb9d71e3b8e259667c4f1693ed09e87017
parentaf6b65d45ef179ed52087e80cb089f6b2349f4ec
commit-reach: plug minor memory leak after using is_descendant_of()

ref_newer() builds a commit_list to pass a single potential ancestor to
is_descendant_of().  The latter leaves the list intact.  Release the
allocated memory after the call.

Signed-off-by: René Scharfe <l.s.r@web.de>
Acked-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
commit-reach.c