Changeset 24046

Show
Ignore:
Timestamp:
19.05.2011 12:09:44 (8 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

Files:
1 modified

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