git.samba.org
/
gd
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b136f15
)
s4/messaging/py: don't DECREF borrowed references
author
Douglas Bagnall
<douglas.bagnall@catalyst.net.nz>
Thu, 1 Aug 2019 04:02:05 +0000
(16:02 +1200)
committer
Noel Power
<npower@samba.org>
Tue, 6 Aug 2019 17:00:38 +0000
(17:00 +0000)
This made Message.deregister() a decref machine, with talloc crashes
and segfaults available thus:
from samba import messaging
m = messaging.Messaging()
for i in range(20):
m.deregister(m)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
source4/lib/messaging/pymessaging.c
patch
|
blob
|
history
diff --git
a/source4/lib/messaging/pymessaging.c
b/source4/lib/messaging/pymessaging.c
index 39c09a8240324c5f4c73b08d1f340ed325df6416..e506d94f4742ecb2b5c6896842865f7ca24d19f5 100644
(file)
--- a/
source4/lib/messaging/pymessaging.c
+++ b/
source4/lib/messaging/pymessaging.c
@@
-259,8
+259,6
@@
static PyObject *py_imessaging_deregister(PyObject *self, PyObject *args, PyObje
imessaging_deregister(iface->msg_ctx, msg_type, callback);
- Py_DECREF(callback);
-
Py_RETURN_NONE;
}