title: when I deallocate an array of strings my program crashes
body: <p>i need to allocate an array of strings. 100 in length, and each cell can contain a string size of 100 characters.</p>
  
  <pre><code>typedef char* (*Encryptor3)(char*, char);
  char** encryptToString(char** input,int length,int first,Encryptor3 encryptor)
  {
  int i=0;
  char** output=(char **)malloc(sizeof(char*)*length);
  for(i=0;i&lt;length;i++){
      output[i]=(char *)malloc(sizeof(char)*(100+1));
  }
  output[0]=encryptor(first,input[0]);
  output[1]=encryptor(first,input[1]);
  
  for(i=2; i&lt;length ; i++)
  {
      output[i]=encryptor(output[i-2],input[i]);
  }
  return output;
  }
  
  int main()
  {
      char plain[] = {'p','l','a','i','n','t','e','x','t'};
      char** outputS = encryptToString(plain, 9, "test", idenString);
      int i;
      for(i=0; i&lt;9; i++)
          printf("%s\n", outputS[i]);
      for(i=0; i&lt;9; i++) //deallocating my array of strings
          free(outputS[i]);
      free(outputS);
      return 0;
  }
  </code></pre>
  
  <p>the line "free(outputS[i]);" will crash the program and i'll get an ordinary error saying "myp.exe has stopped working".</p>