summaryrefslogtreecommitdiffstats
path: root/Modules/operator.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-09-03 18:19:40 (GMT)
committerGuido van Rossum <guido@python.org>1997-09-03 18:19:40 (GMT)
commit9efe8ef7a143d92cdf724c76f6bcf3f5c1ed7a66 (patch)
tree1a52a8f94189f7c613b8c41fffd7eff7f6a1a594 /Modules/operator.c
parentc3beda2f277a003deca2fd0f9b2ae8538d317087 (diff)
downloadcpython-9efe8ef7a143d92cdf724c76f6bcf3f5c1ed7a66.zip
cpython-9efe8ef7a143d92cdf724c76f6bcf3f5c1ed7a66.tar.gz
cpython-9efe8ef7a143d92cdf724c76f6bcf3f5c1ed7a66.tar.bz2
#Plug small memory leaks in constructors.
Diffstat (limited to 'Modules/operator.c')
-rw-r--r--Modules/operator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/operator.c b/Modules/operator.c
index 43324a2..14a7aaf 100644
--- a/Modules/operator.c
+++ b/Modules/operator.c
@@ -256,7 +256,7 @@ spam2(delslice,__delslice__,
void
initoperator()
{
- PyObject *m, *d;
+ PyObject *m, *d, *v;
/* Create the module and add the functions */
m = Py_InitModule4("operator", operator_methods,
@@ -266,7 +266,8 @@ initoperator()
/* Add some symbolic constants to the module */
d = PyModule_GetDict(m);
PyDict_SetItemString(d, "__version__",
- PyString_FromString("$Rev$"));
+ v = PyString_FromString("$Rev$"));
+ Py_XDECREF(v);
/* Check for errors */
if (PyErr_Occurred())