销毁栈的时分崩溃

销毁栈的时候崩溃
销毁栈的时分崩溃
#include <stdio.h>  
#include <malloc.h>  
#include <math.h>  
  
#define STACK_INIT_SIZE 10  
#define STACK_INCREMENT_SIZE 10  
  
typedef char ElemType;  
  
typedef struct   
{  
    ElemType *base;  
    ElemType *top;  
    int stackSize;  
}stack;  
  
void initStack(stack *s)  
{  
    s->base = (ElemType *)malloc(STACK_INIT_SIZE * sizeof(ElemType));  
    if(!(s->base)) return;  
    s->top = s->base;  
    s->stackSize = STACK_INIT_SIZE;  
}  
  
void pushStack(stack *s, ElemType e)  
{  
    if((s->top - s->base) >= s->stackSize)  
    {  
        s->base = (ElemType *)realloc(s->base, (s->stackSize + STACK_INCREMENT_SIZE) * sizeof(ElemType));  
        if(!(s->base)) return;  
        s->top = s->base + s->stackSize;  
        s->stackSize = s->stackSize + STACK_INCREMENT_SIZE;  
    }  
  
    *(s->top) = e;  
    (s->top)++;  
}  
  
void popStack(stack *s, ElemType *e)  
{  
    if(s->base == s->top) return;  
    *e = *(--(s->top));  
}  
  
int stackLen(stack s)  
{  
    return (s.top - s.base);  
}  
  
void destroyStack(stack *s)  
{  
    free(s->base);  
    s->base = s->top = NULL;  
    s->stackSize = 0;  
}  
  
//void destroyStack(stack *s)  
//{  
//  int i, len;  
//  len = s->stackSize;  
//  for(i = 0; i < len; i++)  
//  {  
//      free(s->base);  
//      s->base++;  
//  }  
//  
//  s->base = s->top = NULL;  
//  s->stackSize = 0;  
//}  
  
int power(int n)  
{  
    int i;  
    int product = 1;  
    for(i = 1; i <= n; i++)