Review Request: Fix possible memory and D-Bus connection leak in KStatusNotifierItem

Aaron J. Seigo aseigo at kde.org
Mon Jun 6 22:38:19 CEST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101527/#review3726
-----------------------------------------------------------


i doubt this fix is correct. what looks more like is KStatusNotifierItemDBus::~KStatusNotifierItemDBus(). right now this is the implementation:

m_dbus.unregisterService(m_service);

and perhaps it should include:

m_dbus.unregisterObject("/StatusNotifierItem", this);

and perhaps even:

m_dbus.disconnectFromBus(m_service);

(though i expect the latter is done automatically when QDBusConnection is deleted? maybe not though...)


kdeui/notifications/kstatusnotifieritem.cpp
<http://git.reviewboard.kde.org/r/101527/#comment3080>

    statusNotifierItemDBus is initialized this way:
    
    statusNotifierItemDBus = new KStatusNotifierItemDBus(q);
    
    where 'q' is the QObject-derived StatusNotifierItem. and here is the constructor:
    
    KStatusNotifierItemDBus::KStatusNotifierItemDBus(KStatusNotifierItem *parent)
      : QObject(parent),
    
    
    so i'd be very surprised if it wasn't being deleted when KStatusNotifierItem is deleted. can you confirm that it is not being deleted by putting some debug output in ~KStatusNotifierItemDBus?


- Aaron J.


On June 6, 2011, 3:31 p.m., Christoph Feck wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101527/
> -----------------------------------------------------------
> 
> (Updated June 6, 2011, 3:31 p.m.)
> 
> 
> Review request for kdelibs, Plasma and Marco Martin.
> 
> 
> Summary
> -------
> 
> According to bug 261180 there is a D-Bus connection leak in KStatusNotifierItem. This patch potentially fixes it, but I do not know how to test it.
> 
> 
> This addresses bug 261180.
>     http://bugs.kde.org/show_bug.cgi?id=261180
> 
> 
> Diffs
> -----
> 
>   kdeui/notifications/kstatusnotifieritem.cpp c48ed50 
> 
> Diff: http://git.reviewboard.kde.org/r/101527/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Christoph
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20110606/98588bd2/attachment.htm 


More information about the Plasma-devel mailing list