Changeset 44570 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Feb 6, 2013 2:04:14 PM (12 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp
r44097 r44570 111 111 } 112 112 113 RTMemFree(pvBuf); 113 if (pvBuf) 114 RTMemFree(pvBuf); 114 115 return rc; 115 116 } … … 168 169 char **ppszValue, char **ppszFlags, uint64_t *puTimestamp) 169 170 { 170 char *pszFlags; 171 int rc = VBoxServiceReadProp(u32ClientId, pszPropName, ppszValue, &pszFlags, puTimestamp); 171 AssertPtrReturn(ppszValue, VERR_INVALID_PARAMETER); 172 173 char *pszValue = NULL; 174 char *pszFlags = NULL; 175 int rc = VBoxServiceReadProp(u32ClientId, pszPropName, &pszValue, &pszFlags, puTimestamp); 172 176 if (RT_SUCCESS(rc)) 173 177 { … … 181 185 } 182 186 183 if (ppszFlags) 184 *ppszFlags = pszFlags; 187 if (RT_SUCCESS(rc)) 188 { 189 *ppszValue = pszValue; 190 191 if (ppszFlags) 192 *ppszFlags = pszFlags; 193 else if (pszFlags) 194 RTStrFree(pszFlags); 195 } 185 196 else 186 RTStrFree(pszFlags); 197 { 198 if (pszValue) 199 RTStrFree(pszValue); 200 if (pszFlags) 201 RTStrFree(pszFlags); 202 } 187 203 } 188 204 -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
r44528 r44570 307 307 { 308 308 if (pClient->pszName) 309 { 309 310 RTStrFree(pClient->pszName); 311 pClient->pszName = NULL; 312 } 310 313 if (pClient->pszLocation) 314 { 311 315 RTStrFree(pClient->pszLocation); 316 pClient->pszLocation = NULL; 317 } 312 318 if (pClient->pszDomain) 319 { 313 320 RTStrFree(pClient->pszDomain); 314 315 pClient = NULL;321 pClient->pszDomain = NULL; 322 } 316 323 } 317 324 } … … 753 760 if (pszUserList) 754 761 RTStrFree(pszUserList); 762 763 VBoxServiceVerbose(4, "Writing users returned with rc=%Rrc\n", rc); 755 764 return rc; 756 765 } … … 1192 1201 1193 1202 /* Check for new connection. */ 1194 char *pszLAClientID ;1203 char *pszLAClientID = NULL; 1195 1204 int rc2 = VBoxServiceReadHostProp(g_uVMInfoGuestPropSvcClientID, g_pszLAActiveClient, true /* Read only */, 1196 1205 &pszLAClientID, NULL /* Flags */, NULL /* Timestamp */); 1197 1206 if (RT_SUCCESS(rc2)) 1198 1207 { 1208 AssertPtr(pszLAClientID); 1199 1209 if (RTStrICmp(pszLAClientID, "0")) /* Is a client connected? */ 1200 1210 { … … 1259 1269 } 1260 1270 1271 VBoxServiceVerbose(3, "VRDP: Handling location awareness done\n"); 1272 1261 1273 /* 1262 1274 * Flush all properties if we were restored.
Note:
See TracChangeset
for help on using the changeset viewer.