Changeset 1199

Show
Ignore:
Timestamp:
04/04/07 17:35:39 (2 years ago)
Author:
oxff
Message:

nepenthes.submit-mwserv: fixed another possible double free bug

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nepenthes/trunk/modules/submit-mwserv/TransferSession.cpp

    r1198 r1199  
    105105        m_type = type; 
    106106        m_parent = parent; 
    107         m_sample.binary = 0; 
     107         
     108        m_sample.binary = 0;     
     109        m_multiHandle = 0; 
    108110} 
    109111 
     
    225227        curl_formfree(m_postInfo); 
    226228        curl_easy_cleanup(m_curlHandle); 
    227         curl_multi_cleanup(m_multiHandle); 
     229         
     230        if(m_multiHandle) 
     231        { 
     232                curl_multi_cleanup(m_multiHandle); 
     233                m_multiHandle = 0; 
     234        } 
    228235         
    229236        if(m_sample.binary) 
     237        { 
    230238                delete m_sample.binary; 
     239                m_sample.binary = 0; 
     240        } 
    231241         
    232242        return true;