[Kde-hardware-devel] Review Request 126096: Fix memory leak in kscreen backend of libkscreen

Lamarque Souza lamarque at kde.org
Tue Nov 17 16:34:51 UTC 2015



> On Nov. 17, 2015, 4:08 p.m., Martin Gräßlin wrote:
> > backends/xrandr/xrandrscreen.cpp, line 67
> > <https://git.reviewboard.kde.org/r/126096/diff/1/?file=417181#file417181line67>
> >
> >     Suggestion QScopedPointer<xcb_blah, QScopedPointerPodDeleter>
> 
> Daniel Vrátil wrote:
>     Yes please, but use XCB::ScopedPointer<xcb_...> from xcbwrapper.h instead.

Do you think it is safe to delete the pointer returned by xcb_randr_get_screen_resources_current_reply() in XRandR::screenResources()? I seems so, just wondering if this patch can side effects in the "hack" used in XRandR::screenResources().


- Lamarque


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126096/#review88491
-----------------------------------------------------------


On Nov. 17, 2015, 4:31 p.m., Lamarque Souza wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126096/
> -----------------------------------------------------------
> 
> (Updated Nov. 17, 2015, 4:31 p.m.)
> 
> 
> Review request for Plasma, Solid and Daniel Vrátil.
> 
> 
> Repository: libkscreen
> 
> 
> Description
> -------
> 
> libkscreen needs to free memory of xcb_randr_get_screen_resources_reply.
> 
> 
> Diffs
> -----
> 
>   backends/xrandr/xrandrscreen.cpp 8df957e 
> 
> Diff: https://git.reviewboard.kde.org/r/126096/diff/
> 
> 
> Testing
> -------
> 
> No memory leak and everything still works.
> 
> 
> Thanks,
> 
> Lamarque Souza
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20151117/2651eb8d/attachment.html>


More information about the Kde-hardware-devel mailing list