diff options
| author | Michael Stapelberg <stapelberg@debian.org> | 2013-12-03 09:43:15 +0100 |
|---|---|---|
| committer | Michael Stapelberg <stapelberg@debian.org> | 2013-12-03 09:43:15 +0100 |
| commit | 64d2a7c8945ba05af859901f5e248f1befdd8621 (patch) | |
| tree | 013fcb7e9e3296ecdda876012252c36bd6bcb063 /src/pkg/runtime/cgo/gcc_util.c | |
| parent | b901efe83e212f0c34c769c079e41373da12d723 (diff) | |
| download | golang-64d2a7c8945ba05af859901f5e248f1befdd8621.tar.gz | |
Imported Upstream version 1.2upstream/1.2
Diffstat (limited to 'src/pkg/runtime/cgo/gcc_util.c')
| -rw-r--r-- | src/pkg/runtime/cgo/gcc_util.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/runtime/cgo/gcc_util.c b/src/pkg/runtime/cgo/gcc_util.c index 20913d736..143734e94 100644 --- a/src/pkg/runtime/cgo/gcc_util.c +++ b/src/pkg/runtime/cgo/gcc_util.c @@ -14,6 +14,8 @@ x_cgo_malloc(void *p) } *a = p; a->ret = malloc(a->n); + if(a->ret == NULL && a->n == 0) + a->ret = malloc(1); } /* Stub for calling free from Go */ |
