diff Python/_warnings.c @ 71179:a2944dd4ba7b 2.7

plug refleak
author Benjamin Peterson <benjamin@python.org>
date Sun, 03 Jul 2011 22:18:34 -0500
parents fc46acf7a645
children a8be035f299f
line wrap: on
line diff
--- a/Python/_warnings.c	Mon Jul 04 03:05:37 2011 +0200
+++ b/Python/_warnings.c	Sun Jul 03 22:18:34 2011 -0500
@@ -514,6 +514,7 @@
     }
     else {
         const char *module_str = PyString_AsString(*module);
+        Py_XDECREF(*filename);
         if (module_str && strcmp(module_str, "__main__") == 0) {
             PyObject *argv = PySys_GetObject("argv");
             if (argv != NULL && PyList_Size(argv) > 0) {