]> git.ipfire.org Git - thirdparty/git.git/commit - ref-filter.c
ref-filter: plug memory leak in reach_filter()
authorRené Scharfe <l.s.r@web.de>
Sat, 26 Sep 2020 08:37:29 +0000 (10:37 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 26 Sep 2020 22:39:49 +0000 (15:39 -0700)
commit5336d5069626a9e06e224cbc1730ee96c5742108
treef53b08900182764557b36756b90ab224db3499e0
parentb59cdffd7e3d791ee289ebb46d7109ad3d51d7ea
ref-filter: plug memory leak in reach_filter()

21bf933928 (ref-filter: allow merged and no-merged filters, 2020-09-15)
added an early return to reach_filter().  Avoid leaking the memory of a
then unused array by postponing its allocation until we know we need it.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ref-filter.c