- Timestamp:
- Nov 11, 2017 11:08:43 AM (7 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/SharedClipboard/x11-clipboard.cpp
r69629 r69656 920 920 void ClipDestructX11(CLIPBACKEND *pCtx) 921 921 { 922 /* 923 * Immediately return if we are not connected to the X server. 924 */ 925 if (!pCtx->fHaveX11) 926 return; 927 928 /* We set this to NULL when the event thread exits. It really should 929 * have exited at this point, when we are about to unload the code from 930 * memory. */ 931 Assert(pCtx->widget == NULL); 922 if (pCtx->fHaveX11) 923 /* We set this to NULL when the event thread exits. It really should 924 * have exited at this point, when we are about to unload the code from 925 * memory. */ 926 Assert(pCtx->widget == NULL); 927 RTMemFree(pCtx); 932 928 } 933 929 … … 2189 2185 } 2190 2186 clipConvertX11CB(closure, pValue, count * format / 8); 2187 if (pValue) 2188 RTMemFree(pValue); 2191 2189 } 2192 2190 … … 2348 2346 { 2349 2347 g_completedRC = rc; 2350 memcpy(g_completedBuf, pv, cb); 2348 if (cb != 0) 2349 memcpy(g_completedBuf, pv, cb); 2351 2350 } 2352 2351 else -
trunk/src/VBox/HostServices/SharedClipboard/x11-clipboard.cpp
r69500 r69656 260 260 CLIPREADCBREQ *pReq, void *pv, uint32_t cb) 261 261 { 262 if (cb <= pReq->cb )262 if (cb <= pReq->cb && cb != 0) 263 263 memcpy(pReq->pv, pv, cb); 264 264 RTMemFree(pReq);
Note:
See TracChangeset
for help on using the changeset viewer.