Review Request 126512: Use proper deleters for libxcb structs in xembed-sni-proxy.

Michael Pyne mpyne at kde.org
Sat Dec 26 05:32:58 UTC 2015


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

(Updated Dec. 26, 2015, 5:32 a.m.)


Status
------

This change has been marked as submitted.


Review request for Plasma.


Changes
-------

Submitted with commit a14a7d39c41bd3280dcc56dcd97e846e0278e812 by Michael Pyne to branch Plasma/5.5.


Repository: plasma-workspace


Description
-------

Coverity noted we were mismatching new Foo with free(foo), which is
undefined behavior (CID 1340556). While I was fixing that I noticed we
have the same issue with QScopedPointer<>: when using QSP to track
objects returned by libxcb, we must use free() to release memory, not
C++ delete. (e.g. see
the [XCB API](http://xcb.freedesktop.org/manual/group__XCB____API.html#ga6727f2bfb24769655e52d1f1c50f58fe)).

QScopedPointer will do this if we use QScopedPointerPodDeleter.


Diffs
-----

  xembed-sni-proxy/sniproxy.cpp ae6eab7 

Diff: https://git.reviewboard.kde.org/r/126512/diff/


Testing
-------

I've only compiled and verified no warnings at this point. I didn't see any relevant crash bugs after a quick web search either.


Thanks,

Michael Pyne

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20151226/591d52a6/attachment-0001.html>


More information about the Plasma-devel mailing list