VirtualBox

Changeset 103239 in vbox for trunk/src/VBox/GuestHost


Ignore:
Timestamp:
Feb 7, 2024 11:20:17 AM (10 months ago)
Author:
vboxsync
Message:

Shared Clipboard/tstClipboardGH-X11: Fixed a leak in tstShClOnSendDataToDestCallback().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/SharedClipboard/testcase/tstClipboardGH-X11.cpp

    r102931 r103239  
    426426    g_tst_cbCompleted = cb;
    427427
     428    if (pData->enmType == SHCLX11EVENTTYPE_READ)
     429        RTMemFree(pData->Read.pvData);
     430    RTMemFree(pData);
     431
    428432    return VINF_SUCCESS;
    429433}
     
    468472                             const char *pcszExp, int rcExp)
    469473{
    470     bool retval = true;
     474    bool fRc = true;
    471475    tstClipSendTargetUpdate(pCtx);
    472476    if (tstClipQueryFormats() != VBOX_SHCL_FMT_UNICODETEXT)
     
    482486            RTTestFailed(hTest, "Wrong return code, expected %Rrc, got %Rrc\n", rcExp, rc);
    483487        else if (RT_FAILURE(rcExp))
    484             retval = true;
     488            fRc = true;
    485489        else
    486490        {
     
    500504                {
    501505                    if (memcmp(abBuf, wcExp, cbExp) == 0)
    502                         retval = true;
     506                        fRc = true;
    503507                    else
    504508                        RTTestFailed(hTest, "Returned string \"%.*ls\" does not match expected string \"%s\"\n",
     
    508512        }
    509513    }
    510     if (!retval)
    511         RTTestFailureDetails(hTest, "Expected: string \"%s\", rc %Rrc\n",
    512                              pcszExp, rcExp);
     514    if (!fRc)
     515        RTTestFailureDetails(hTest, "Expected: string \"%s\", rc=%Rrc\n", pcszExp, rcExp);
    513516}
    514517
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