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

Michael Pyne mpyne at kde.org
Fri Dec 25 04:53:38 UTC 2015


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

Review request for Plasma.


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/20151225/6ed528a7/attachment.html>


More information about the Plasma-devel mailing list