From: Johannes Schindelin Date: Fri, 28 Apr 2017 11:02:19 GMT Subject: Re: [PATCH 20/26] line-log: avoid memory leak Message-ID: In-Reply-To: <4ae94881-305f-380b-e786-c7f4ea5735e3@kdbg.org> Hi Hannes, On Thu, 27 Apr 2017, Johannes Sixt wrote: > Am 26.04.2017 um 22:21 schrieb Johannes Schindelin: > > Discovered by Coverity. > > > > Signed-off-by: Johannes Schindelin > > --- > > line-log.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/line-log.c b/line-log.c > > index a23b910471b..19d46e9ea2c 100644 > > --- a/line-log.c > > +++ b/line-log.c > > @@ -1125,6 +1125,7 @@ static int process_ranges_ordinary_commit(struct > > rev_info *rev, struct commit *c > > changed = process_all_files(&parent_range, rev, &queue, range); > > if (parent) > > add_line_range(rev, parent, parent_range); > > + free(parent_range); > > return changed; > > } > > > > > > parent_range is of type struct line_log_data *, which needs more than a mere > free(). I think it's free_line_log_data(parent_range). Oh wow, thanks for pointing that out. Will be fixed in the next iteration. Ciao, Dscho