Thread (151 messages) 151 messages, 6 authors, 2017-05-11

Re: [PATCH 20/26] line-log: avoid memory leak

From: Johannes Schindelin <hidden>
Date: 2017-04-28 11:03:01

Hi Hannes,

On Thu, 27 Apr 2017, Johannes Sixt wrote:
Am 26.04.2017 um 22:21 schrieb Johannes Schindelin:
quoted
Discovered by Coverity.

Signed-off-by: Johannes Schindelin <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help