GNOME Bugzilla – Bug 695376
GDBusMethodInvocation leak and potential crash
Last modified: 2013-03-18 02:46:16 UTC
_g_dbus_method_invocation_new is said to allow method_info == NULL, but will crash inside g_dbus_method_info_ref when the method_info really is NULL, because g_dbus_method_info_ref does not allow NULL as parameter. Found while looking for a leak. The leak itself happens because _g_dbus_method_invocation_new stores a new reference to the method_info without also unreferencing it. Found in SyncEvolution, which creates GDBusMethodInfo instances dynamically. I'll attach a patch. FWIW, the whole concept of reference counting for GDBusMethodInfo and GDBusSignalInfo is pretty pointless because in GDBusInterfaceInfo one has to store plain pointers in a class which does not support reference counting for these pointers.
Created attachment 238326 [details] [review] fix ref and add unref