Changeset 98587 in vbox
- Timestamp:
- Feb 15, 2023 1:23:05 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/testcase/TstHGCMMock.cpp
r98578 r98587 192 192 pFn->u.Call.hCall = callHandle; 193 193 pFn->u.Call.iFunc = function; 194 pFn->u.Call.cParms = cParms; 194 195 PVBOXHGCMSVCPARM const paParmsCopy = (PVBOXHGCMSVCPARM)RTMemDup(paParms, cbParms); 195 196 pFn->u.Call.pParms = paParmsCopy; 196 AssertPtrReturn(pFn->u.Call.pParms, VERR_NO_MEMORY); 197 pFn->u.Call.cParms = cParms; 197 AssertPtrReturn(paParmsCopy, VERR_NO_MEMORY); 198 198 199 199 RTListAppend(&pSvc->lstCall, &pFn->Node); 200 pFn = NULL; /* Thread takes ownership now. We keep ownership of paParmsCopy. */ 200 201 201 202 int rc2 = RTSemEventSignal(pSvc->hEventQueue); … … 206 207 207 208 memcpy(paParms, paParmsCopy, cbParms); 208 /** @todo paParmsCopy is leaked, right? Doesn't appear to be a 209 * use-after-free here. (pFn is freeded though) */ 209 RTMemFree(paParmsCopy); 210 210 211 211 return VINF_SUCCESS; /** @todo Return host call rc */
Note:
See TracChangeset
for help on using the changeset viewer.