[Python-checkins] cpython: fix possible NULL dereference

benjamin.peterson python-checkins at python.org
Sat Dec 17 14:02:23 CET 2011


http://hg.python.org/cpython/rev/8c355edc5b1d
changeset:   74011:8c355edc5b1d
user:        Benjamin Peterson <benjamin at python.org>
date:        Sat Dec 17 08:02:20 2011 -0500
summary:
  fix possible NULL dereference

files:
  Objects/descrobject.c |  4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Objects/descrobject.c b/Objects/descrobject.c
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -628,7 +628,9 @@
             Py_DECREF(descr);
             descr = NULL;
         }
-        descr->d_qualname = NULL;
+        else {
+            descr->d_qualname = NULL;
+        }
     }
     return descr;
 }

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list