diff Python/_warnings.c @ 71178:f0382acebfe6 3.2

plug refleak
author Benjamin Peterson <benjamin@python.org>
date Sun, 03 Jul 2011 22:18:34 -0500
parents ac18e70cbe7e
children 7eb85a23cf3d
line wrap: on
line diff
--- a/Python/_warnings.c	Sun Jul 03 18:21:38 2011 -0700
+++ b/Python/_warnings.c	Sun Jul 03 22:18:34 2011 -0500
@@ -517,6 +517,7 @@
     }
     else {
         const char *module_str = _PyUnicode_AsString(*module);
+        Py_XDECREF(*filename);
         if (module_str == NULL)
                 goto handle_error;
         if (strcmp(module_str, "__main__") == 0) {