Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double unref issue when using signal callback #8

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pystemd/dbuslib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ cdef class DbusMessage:
cdef public dict headers

def __dealloc__(self):
dbusc.sd_bus_message_unref(self._msg)
dbusc.sd_bus_message_unref(self._msg)

cdef dbusc.sd_bus_message **ref(self):
return &(self._msg)
Expand All @@ -84,7 +84,9 @@ cdef class DbusMessage:
return self._msg

cdef set_bus_message(self, dbusc.sd_bus_message *msg):
dbusc.sd_bus_message_unref(self._msg)
self._msg = msg
dbusc.sd_bus_message_ref(self._msg)

cpdef process_reply(self, bool with_headers):
"""
Expand Down