提交 1a8fb155 编写于 作者: J Junio C Hamano 提交者: Junio C Hamano

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: NJunio C Hamano <junio@pobox.com>
Acked-by: NJohannes Schindelin <Johannes.Schindelin@gmx.de>
上级 61fb0b75
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册