let the stack_init function alloc the memory for stack, but a memory leak in stack_destroy