1
0
mirror of https://github.com/git/git.git synced 2024-11-20 04:24:01 +01:00

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>
This commit is contained in:
Junio C Hamano 2008-06-17 00:23:31 -07:00 committed by Junio C Hamano
parent 61fb0b75d1
commit 1a8fb155cf

@ -43,7 +43,7 @@ static void read_rr(struct path_list *rr)
; /* 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;
}
fclose(in);
}