diff options
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 */ |