Commit d152321c authored by Shenghou Ma's avatar Shenghou Ma

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
parent dcc46388
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment