VirtualBox

Ignore:
Timestamp:
Jun 10, 2021 4:15:40 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145053
Message:

Additions: X11: VMSVGA: prevent memory leak on CRTC disable, bugref#10028.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp

    r89603 r89609  
    153153    XRROutputInfo* (*pXRRGetOutputInfo) (Display *, XRRScreenResources *, RROutput);
    154154    XRRCrtcInfo* (*pXRRGetCrtcInfo) (Display *, XRRScreenResources *, RRCrtc crtc);
     155    void (*pXRRFreeCrtcInfo)(XRRCrtcInfo *);
    155156    void (*pXRRAddOutputMode)(Display *, RROutput, RRMode);
    156157};
     
    838839    *(void **)(&x11Context.pXRRGetCrtcInfo) = dlsym(x11Context.pRandLibraryHandle, "XRRGetCrtcInfo");
    839840    checkFunctionPtrReturn(x11Context.pXRRGetCrtcInfo);
     841
     842    *(void **)(&x11Context.pXRRFreeCrtcInfo) = dlsym(x11Context.pRandLibraryHandle, "XRRFreeCrtcInfo");
     843    checkFunctionPtrReturn(x11Context.pXRRFreeCrtcInfo);
    840844
    841845    *(void **)(&x11Context.pXRRAddOutputMode) = dlsym(x11Context.pRandLibraryHandle, "XRRAddOutputMode");
     
    9991003                                           CurrentTime, 0, 0, None, RR_Rotate_0, NULL, 0);
    10001004#endif
     1005
     1006#ifdef WITH_DISTRO_XRAND_XINERAMA
     1007    XRRFreeCrtcInfo(pCrctInfo);
     1008#else
     1009    if (x11Context.pXRRFreeCrtcInfo)
     1010        x11Context.pXRRFreeCrtcInfo(pCrctInfo);
     1011#endif
     1012
    10011013    /** @todo  In case of unsuccesful crtc config set  we have to revert frame buffer size and crtc sizes. */
    10021014    if (ret == Success)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette