Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 35895:fe4c627b2096 legacy-trunk
Fix a few more memory leaks
Document more info about the benefits of configuring without
pymalloc when running valgrind
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Sun, 20 Nov 2005 23:58:38 +0000 |
| parents | 825655bfdf20 |
| children | 79374eb6db51 |
line wrap: on
line diff
--- a/Python/compile.c Sun Nov 20 00:24:18 2005 +0000 +++ b/Python/compile.c Sun Nov 20 23:58:38 2005 +0000 @@ -2384,7 +2384,10 @@ dot = strchr(src, '.'); attr = PyString_FromStringAndSize(src, dot ? dot - src : strlen(src)); + if (!attr) + return -1; ADDOP_O(c, LOAD_ATTR, attr, names); + Py_DECREF(attr); src = dot + 1; } }
