VirtualBox

Ignore:
Timestamp:
Sep 7, 2015 1:00:03 PM (9 years ago)
Author:
vboxsync
Message:

RTCrPemFreeSections: pbData is always on the heap, so don't call RTFileReadAllFree any more.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/crypto/pemfile.cpp

    r57577 r57641  
    306306        pSectionHead = pSectionHead->pNext;
    307307
    308         if (pFree->pMarker)
    309         {
    310             if (pFree->pbData)
    311             {
    312                 RTMemFree(pFree->pbData);
    313                 pFree->pbData = NULL;
    314                 pFree->cbData = 0;
    315             }
    316 
    317             if (pFree->pszPreamble)
    318             {
    319                 RTMemFree(pFree->pszPreamble);
    320                 pFree->pszPreamble = NULL;
    321                 pFree->cchPreamble = 0;
    322             }
    323         }
    324         else
    325         {
    326             RTFileReadAllFree(pFree->pbData, pFree->cbData);
    327             Assert(!pFree->pszPreamble);
    328         }
    329         pFree->pbData = NULL;
    330         pFree->cbData = 0;
     308        Assert(pFree->pMarker || !pFree->pszPreamble);
     309
     310        if (pFree->pbData)
     311        {
     312            RTMemFree(pFree->pbData);
     313            pFree->pbData = NULL;
     314            pFree->cbData = 0;
     315        }
     316
     317        if (pFree->pszPreamble)
     318        {
     319            RTMemFree(pFree->pszPreamble);
     320            pFree->pszPreamble = NULL;
     321            pFree->cchPreamble = 0;
     322        }
    331323    }
    332324    return VINF_SUCCESS;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette