mingw: avoid memory leak when splitting PATH
commit1a845a2c88e5b72acce33c9719ec36fcd0f9c877
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 4 May 2017 13:55:24 +0000 (4 15:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 May 2017 03:18:19 +0000 (8 12:18 +0900)
tree67101e9289f17325f5a8cef34904b773502f4b7f
parentd2bbb7c2bcf6e77ebfcabf4e12110fe6d5c91de6
mingw: avoid memory leak when splitting PATH

In the (admittedly, concocted) case that PATH consists only of path
delimiters, we would leak the duplicated string.

Reported by Coverity.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c