1. Stefan Saasen
  2. git


Junio C Hamano  committed 1a8fb15

builtin-rerere: fix a small leak

The data read from MERGE_RR file is kept in path-list by hanging textual
40-byte conflict signature to path of the blob that contains the
conflict. The signature is strdup'ed twice, and the second copy is given
to the path-list, leaking the first copy.

Signed-off-by: Junio C Hamano <junio@pobox.com>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

  • Participants
  • Parent commits 61fb0b7
  • Branches master

Comments (0)

Files changed (1)

File builtin-rerere.c

View file
 			; /* do nothing */
 		if (i == sizeof(buf))
 			die("filename too long");
-		path_list_insert(buf, rr)->util = xstrdup(name);
+		path_list_insert(buf, rr)->util = name;