Changeset 10834 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Jul 23, 2008 3:02:33 PM (17 years ago)
- Location:
- trunk/src/VBox/Additions/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxControl/VBoxControl.cpp
r10829 r10834 907 907 for (unsigned i = 0; (i < 10) && !finish; ++i) 908 908 { 909 pvBuf = RTMemRealloc(pvBuf, cbBuf);910 if (NULL == pv Buf)909 void *pvTmpBuf = RTMemRealloc(pvBuf, cbBuf); 910 if (NULL == pvTmpBuf) 911 911 { 912 RTMemFree(pvBuf); 912 913 rc = VERR_NO_MEMORY; 913 914 VBoxControlError("Out of memory\n"); 914 915 } 915 916 else 917 { 918 pvBuf = pvTmpBuf; 916 919 rc = VbglR3GuestPropRead(u32ClientId, pszName, pvBuf, cbBuf, 917 920 &pszValue, &u64Timestamp, &pszFlags, 918 921 &cbBuf); 922 } 919 923 if (VERR_BUFFER_OVERFLOW == rc) 920 924 /* Leave a bit of extra space to be safe */ … … 943 947 if (u32ClientId != 0) 944 948 VbglR3GuestPropDisconnect(u32ClientId); 945 VbglR3GuestPropReadValueFree(pszValue);946 949 return RT_SUCCESS(rc) ? 0 : 1; 947 950 } -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
r10829 r10834 270 270 for (unsigned i = 0; (i < 10) && !finish; ++i) 271 271 { 272 pvBuf = RTMemRealloc(pvBuf, cchBuf); 273 if (NULL == pvBuf) 272 void *pvTmpBuf = RTMemRealloc(pvBuf, cchBuf); 273 if (NULL == pvTmpBuf) 274 { 275 RTMemFree(pvBuf); 274 276 rc = VERR_NO_MEMORY; 277 } 275 278 else 279 { 280 pvBuf = pvTmpBuf; 276 281 rc = VbglR3GuestPropRead(u32ClientId, pszName, pvBuf, cchBuf, 277 282 &pszValue, NULL, NULL, &cchBuf); 283 } 278 284 if (VERR_BUFFER_OVERFLOW == rc) 279 285 /* Leave a bit of extra space to be safe */
Note:
See TracChangeset
for help on using the changeset viewer.