VirtualBox

Changeset 54861 in vbox


Ignore:
Timestamp:
Mar 20, 2015 9:58:49 AM (10 years ago)
Author:
vboxsync
Message:

Audio/AudioMixBuffer: Fix small memory leak in the recording path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp

    r54482 r54861  
    723723    if (RT_SUCCESS(rc))
    724724    {
    725         /* Create rate conversion. */
    726         pMixBuf->pRate = (PPDMAUDIOSTRMRATE)RTMemAllocZ(sizeof(PDMAUDIOSTRMRATE));
    727725        if (!pMixBuf->pRate)
    728             return VERR_NO_MEMORY;
     726        {
     727            /* Create rate conversion. */
     728            pMixBuf->pRate = (PPDMAUDIOSTRMRATE)RTMemAllocZ(sizeof(PDMAUDIOSTRMRATE));
     729            if (!pMixBuf->pRate)
     730                return VERR_NO_MEMORY;
     731        }
     732        else
     733            RT_BZERO(pMixBuf->pRate, sizeof(PDMAUDIOSTRMRATE));
    729734
    730735        pMixBuf->pRate->dstInc =
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