chiark
/
gitweb
/
~mdw
/
catacomb-python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb8f950
)
key.c: Make `KeyDataStructured' constructor cleanup less bizarre.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 25 Nov 2019 11:44:52 +0000
(11:44 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 11 Apr 2020 11:49:31 +0000
(12:49 +0100)
Drop the reference to `kd' if it's non-null, rather than inspecting the
apparently unrelated `me'.
key.c
patch
|
blob
|
blame
|
history
diff --git
a/key.c
b/key.c
index 1af47890fb5fd1ad3d242020c320f129694dfac0..e6af27dd153e1dff5b01b9d6337669fd8cc3e921 100644
(file)
--- a/
key.c
+++ b/
key.c
@@
-1049,10
+1049,10
@@
static PyObject *keydatastruct_pynew(PyTypeObject *ty,
}
me = (keydata_pyobj *)ty->tp_alloc(ty, 0);
me->gmops = &keydatastruct_gmops;
- me->kd = kd;
+ me->kd = kd;
kd = 0;
end:
- if (kd && !me) key_drop(kd);
Py_XDECREF(name); Py_XDECREF(val); Py_XDECREF(it);
+ if (kd) key_drop(kd);
return ((PyObject *)me);
}