aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/cgo
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2020-01-22 20:48:21 -0800
committerKeith Randall <khr@golang.org>2020-02-24 21:32:48 +0000
commit4f074b58d2016eee2b63ffb668f6ed28156ecf62 (patch)
treeee8cdac0eeeb08375c07ef70bd27f8f0cc1af7c7 /src/runtime/cgo
parent28c501b7b3405cf2afa7b9a440c9fc835d5276a0 (diff)
downloadgo-4f074b58d2016eee2b63ffb668f6ed28156ecf62.tar.gz
go-4f074b58d2016eee2b63ffb668f6ed28156ecf62.zip
runtime/cgo: fix unsetenv wrapper
The wrapper takes a pointer to the argument, not the argument itself. Fixes #36705 Change-Id: I566d4457d00bf5b84e4a8315a26516975f0d7e10 Reviewed-on: https://go-review.googlesource.com/c/go/+/215942 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/cgo')
-rw-r--r--src/runtime/cgo/gcc_setenv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/cgo/gcc_setenv.c b/src/runtime/cgo/gcc_setenv.c
index 88e92bfd8a..d4f798357a 100644
--- a/src/runtime/cgo/gcc_setenv.c
+++ b/src/runtime/cgo/gcc_setenv.c
@@ -20,9 +20,9 @@ x_cgo_setenv(char **arg)
/* Stub for calling unsetenv */
void
-x_cgo_unsetenv(char *arg)
+x_cgo_unsetenv(char **arg)
{
_cgo_tsan_acquire();
- unsetenv(arg);
+ unsetenv(arg[0]);
_cgo_tsan_release();
}