VirtualBox

Ignore:
Timestamp:
Jul 23, 2008 3:02:33 PM (16 years ago)
Author:
vboxsync
Message:

Additions/common: guest property fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp

    r10829 r10834  
    270270    for (unsigned i = 0; (i < 10) && !finish; ++i)
    271271    {
    272         pvBuf = RTMemRealloc(pvBuf, cchBuf);
    273         if (NULL == pvBuf)
     272        void *pvTmpBuf = RTMemRealloc(pvBuf, cchBuf);
     273        if (NULL == pvTmpBuf)
     274        {
     275            RTMemFree(pvBuf);
    274276            rc = VERR_NO_MEMORY;
     277        }
    275278        else
     279        {
     280            pvBuf = pvTmpBuf;
    276281            rc = VbglR3GuestPropRead(u32ClientId, pszName, pvBuf, cchBuf,
    277282                                     &pszValue, NULL, NULL, &cchBuf);
     283        }
    278284        if (VERR_BUFFER_OVERFLOW == rc)
    279285            /* Leave a bit of extra space to be safe */
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