Changeset 24045

Show
Ignore:
Timestamp:
19.05.2011 12:07:59 (8 years ago)
Author:
jmt12
Message:

I'd misunderstood where I needed to free the memory allocated to storing char*s in the TDB_DATA. Apparently I only have to free them when they are returned by tdb_fetch() or similar. Removed segfault causing calls to free()

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gs2-extensions/tdb-edit/trunk/src/src/txt2tdb-src/txt2tdb.cpp

    r24040 r24045  
    205205      } 
    206206      // - otherwise add 
    207       else { 
     207      else 
     208      { 
    208209        // - convert value to a datum datatype 
    209210        TDB_DATA value_data; 
     
    221222          exit (0); 
    222223        } 
    223         free(value_data.dptr); 
    224       } 
    225       free(key_data.dptr); 
     224      } 
    226225    } 
    227226  }