VirtualBox

Ignore:
Timestamp:
Oct 7, 2021 9:14:43 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147349
Message:

SharedClipboard/X11: ShClX11RequestFromX11CompleteCallback must free payload if we fail to signal the event for some reason (that's what the others are doing). bugref:9437

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r90238 r91624  
    326326        if (RT_SUCCESS(rc2))
    327327        {
    328             ShClEventSignal(&pCtx->pClient->EventSrc, pReq->idEvent, pPayload);
    329             /* Note: Skip checking if signalling the event is successful, as it could be gone already by now. */
     328            rc2 = ShClEventSignal(&pCtx->pClient->EventSrc, pReq->idEvent, pPayload);
    330329            RTCritSectLeave(&pCtx->pClient->CritSect);
    331         }
     330            if (RT_SUCCESS(rc2))
     331                pPayload = NULL;
     332        }
     333
     334        if (pPayload)
     335            ShClPayloadFree(pPayload);
    332336    }
    333337
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