Ticket #5074: FZS-FixMD5MemLeak.patch

File FZS-FixMD5MemLeak.patch, 778 bytes (added by eyebex, 11 years ago)
  • Interface/misc/md5.cpp

     
    282282
    283283
    284284ostream& operator<<(ostream &stream, MD5 context){
    285 
    286   stream << context.hex_digest();
     285  char* digest=context.hex_digest();
     286  stream << digest;
     287  delete [] digest;
    287288  return stream;
    288289}
    289290
  • misc/md5.cpp

     
    291291
    292292
    293293ostream& operator<<(ostream &stream, MD5 context){
    294 
    295   stream << context.hex_digest();
     294  char* digest=context.hex_digest();
     295  stream << digest;
     296  delete [] digest;
    296297  return stream;
    297298}
    298299