D6252: [xembedsniproxy] Fix memleak and possible crash

Wolfgang Bauer noreply at phabricator.kde.org
Sat Jun 17 17:03:39 UTC 2017


wbauer created this revision.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  Check the return value of xcb_get_window_attributes_reply() to prevent a crash if getting the window attributes would fail for some reason.
  
  Also free the returned structure after usage to avoid memleaks.
  This is necessary according to https://xcb.freedesktop.org/windowcontextandmanipulation (see the end of the page).

TEST PLAN
  We got some reports about XEmbed icons not showing up any more in openSUSE after the previous fixes (not reproducible though).
  And this is the only place that could cause a crash IMHO.
  
  I actually was able to reproduce a crash after installing an old fcitx version (that caused xembedsniproxy to crash before), this patch fixes the crash.

REPOSITORY
  R120 Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D6252

AFFECTED FILES
  xembed-sni-proxy/sniproxy.cpp

To: wbauer, davidedmundson
Cc: plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170617/c4f34725/attachment.html>


More information about the Plasma-devel mailing list