Ignore:
Timestamp:
2011-05-19T12:09:44+12:00 (13 years ago)
Author:
jmt12
Message:

While checking where else I'd added erronous free() calls, I found a missing one - or maybe I just commented a legitimate one. Hmmm

File:
1 edited

Legend:

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

    r24032 r24046  
    7878    cerr << "couldn't create " << dbname << endl;
    7979    exit (0);
    80   } 
     80  }
    8181
    8282  TDB_DATA key = tdb_firstkey(tdb);
     
    9595    }
    9696    cout << endl << "----------------------------------------------------------------------" << endl;
     97
     98    // caller responsible for freeing this memory
    9799    free(value.dptr);
    98100
     
    101103
    102104    /* free old key's dptr, otherwise causes memory leak */
    103     free(key.dptr); 
    104    
     105    free(key.dptr);
     106
    105107    /* can now safely copy content of nextkey into key */
    106108    key = nextkey;
    107109  }
    108  
     110
    109111  tdb_close(tdb);
    110112
Note: See TracChangeset for help on using the changeset viewer.