Index: cygpath.cc =================================================================== RCS file: /cvs/src/src/winsup/utils/cygpath.cc,v retrieving revision 1.59 diff -d -u -r1.59 cygpath.cc --- cygpath.cc 16 Jan 2010 10:25:58 -0000 1.59 +++ cygpath.cc 13 Feb 2010 01:34:09 -0000 @@ -772,8 +772,6 @@ buf = get_long_name (tmp = buf, len); free (tmp); } - /* buf gets moved into the array so we have to set tmp for later - freeing beforehand. */ tmp = buf; if (strncmp (buf, "\\\\?\\", 4) == 0) { @@ -782,13 +780,13 @@ len = 6; if (strlen (buf) < MAX_PATH + len) { - buf += len; + tmp += len; if (len == 6) - *buf = '\\'; + *tmp = '\\'; } } if (mixed_flag) - convert_slashes (buf); + convert_slashes (tmp); } } @@ -796,7 +794,7 @@ if (buf2) free (buf2); if (buf) - free (tmp); + free (buf); } static void