make_absolute_path: return the input path if it points to our buffer
authorCarlos Martín Nieto <cmn@elego.de>
Wed, 16 Mar 2011 16:06:17 +0000 (17:06 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Mar 2011 20:51:22 +0000 (13:51 -0700)
Some codepaths call make_absolute_path with its own return value as
input. In such a cases, return the path immediately.

This fixes a valgrind-discovered error, whereby we tried to copy a
string onto itself.

Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found