Fix memleak of xcb_image_t

Review Request #129137 - Created Oct. 9, 2016 and submitted

Information
Peter Wu
spectacle
Reviewers
bgupta

Use xcb_image_destroy instead of free, fixes this ASAN report:

Direct leak of 8294432 byte(s) in 1 object(s) allocated from:
    ...
    #5 0x7f11f9d71938 in xcb_image_get (/usr/lib/libxcb-image.so.0+0x1938)
    #6 0x452612 in X11ImageGrabber::getWindowPixmap(unsigned int, bool) src/PlatformBackends/X11ImageGrabber.cpp:296
    #7 0x45437c in X11ImageGrabber::grabFullScreen() src/PlatformBackends/X11ImageGrabber.cpp:418
    #8 0x432bdd in ImageGrabber::doImageGrab() src/PlatformBackends/ImageGrabber.cpp:90
    ...

Ran under ASAN, the reported memleak is gone.

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Boudhayan Gupta
Peter Wu
Peter Wu
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit af7469148e15ae11c48e6e6fba7019ea8397a58b by Peter Wu to branch master.
Loading...