VirtualBox

Changeset 85762 in vbox


Ignore:
Timestamp:
Aug 14, 2020 10:55:03 AM (4 years ago)
Author:
vboxsync
Message:

Shared Clipboard: Also free X11 CLIPREADCBREQ in ShClBackendReadData() on error.

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/clipboard-x11.cpp

    r85567 r85762  
    23282328 * @param   pCtx                Context data for the clipboard backend.
    23292329 * @param   Format              The format that the VBox would like to receive the data in.
    2330  * @param   pReq                Read callback request to use. Must be free'd in the callback.
     2330 * @param   pReq                Read callback request to use. Will be free'd in the callback on success.
     2331 *                              Otherwise the caller has to free this again on error.
    23312332 *
    23322333 * @note   We allocate a request structure which must be freed by the worker.
  • trunk/src/VBox/HostServices/SharedClipboard/VBoxSharedClipboardSvc-x11.cpp

    r84142 r85762  
    197197        if (idEvent != NIL_SHCLEVENTID)
    198198        {
     199            /* Note: ShClX11ReadDataFromX11() will consume pReq on success. */
    199200            rc = ShClX11ReadDataFromX11(&pClient->State.pCtx->X11, uFormat, pReq);
    200201            if (RT_SUCCESS(rc))
     
    215216        }
    216217        else
    217         {
     218            rc = VERR_SHCLPB_MAX_EVENTS_REACHED;
     219
     220        if (RT_FAILURE(rc))
    218221            RTMemFree(pReq);
    219             rc = VERR_SHCLPB_MAX_EVENTS_REACHED;
    220         }
    221222    }
    222223    else
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