1
0
mirror of https://github.com/golang/go synced 2024-11-11 23:40:22 -07:00

lib9: fix memory leak in p9getwd()

although the comment says it uses libc's getenv, without NOPLAN9DEFINES
        it actually uses p9getenv which strdups.

R=golang-dev, dave, rsc
CC=golang-dev
https://golang.org/cl/6285046
This commit is contained in:
Shenghou Ma 2012-06-05 01:31:23 +08:00
parent dcc46388df
commit d152321cea

View File

@ -26,10 +26,9 @@ THE SOFTWARE.
#include <u.h>
#include <errno.h>
#include <sys/stat.h>
#define NOPLAN9DEFINES
#include <libc.h>
#undef getwd
char*
p9getwd(char *s, int ns)
{