<table><tr><td style="">wbauer created this revision.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D6252" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Check the return value of xcb_get_window_attributes_reply() to prevent a crash if getting the window attributes would fail for some reason.</p>

<p>Also free the returned structure after usage to avoid memleaks.<br />
This is necessary according to <a href="https://xcb.freedesktop.org/windowcontextandmanipulation" class="remarkup-link" target="_blank" rel="noreferrer">https://xcb.freedesktop.org/windowcontextandmanipulation</a> (see the end of the page).</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>We got some reports about XEmbed icons not showing up any more in openSUSE after the previous fixes (not reproducible though).<br />
And this is the only place that could cause a crash IMHO.</p>

<p>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.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D6252" rel="noreferrer">https://phabricator.kde.org/D6252</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>xembed-sni-proxy/sniproxy.cpp</div></div></div><br /><div><strong>To: </strong>wbauer, davidedmundson<br /><strong>Cc: </strong>plasma-devel, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas<br /></div>