diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index 1d1b05969c6..9483e4c2904 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -956,7 +956,8 @@ unwindstack(G *gp, byte *sp) break; gp->stackbase = top->stackbase; gp->stackguard = top->stackguard; - free(stk); + if(top->free) + stackfree(stk); } if(sp != nil && (sp < gp->stackguard - StackGuard || gp->stackbase < sp)) {