free() crash

From: Aftermath (chris@DP.NET)
Date: 01/30/98


In a structure I have two members,
 char * titlem[ LVL_IMPL + 1 ];
 char * titlef[ LVL_IMPL + 1 ];

At one point I wish to free them, and I do so like this :

  for( i = 0; i <= LVL_IMPL ; i++ )
   {
    if( cls->titlem[ i ] ) free( cls->titlem[ i ] );
    if( cls->titlem[ i ] ) free( cls->titlem[ i ] );
   }
Ive printed a list of the titles, using the same for loop, and they all
exist. But these continually crash me, and I was wondering if anyone
would have a clue as to why. The gdb print out wouldn't be of much use
with a free(), and I made checks to make sure the pointer cls is not
NULL.

Thanks in advance,
  Aftermath


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST