cmd/dist: fix crash on windows

currently 'dist install' always crashes on windows

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/11919043
This commit is contained in:
Dmitriy Vyukov 2013-07-27 13:53:18 +04:00
parent 91d35ad1b8
commit d5c7ef6216

View File

@ -465,7 +465,7 @@ xrealwd(Buf *b, char *path)
torune(&rnew, path); torune(&rnew, path);
if(!SetCurrentDirectoryW(rnew)) if(!SetCurrentDirectoryW(rnew))
fatal("chdir %s: %s", path, errstr()); fatal("chdir %s: %s", path, errstr());
free(rnew); xfree(rnew);
xgetwd(b); xgetwd(b);
if(!SetCurrentDirectoryW(old)) { if(!SetCurrentDirectoryW(old)) {
breset(b); breset(b);