mirror of
https://github.com/golang/go
synced 2024-11-21 21:54:40 -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:
parent
dcc46388df
commit
d152321cea
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user