diff Modules/operator.c @ 6227:613f976a57b4 legacy-trunk

#Plug small memory leaks in constructors.
author Guido van Rossum <guido@python.org>
date Wed, 03 Sep 1997 18:19:40 +0000
parents 64e194c5f854
children 1f38a2b548bf
line wrap: on
line diff
--- a/Modules/operator.c	Wed Sep 03 18:14:30 1997 +0000
+++ b/Modules/operator.c	Wed Sep 03 18:19:40 1997 +0000
@@ -256,7 +256,7 @@
 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 @@
         /* 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())