diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2005-11-20 23:58:38 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2005-11-20 23:58:38 (GMT) |
commit | 7bcabc60a36eb5910bd162d54ece449f5249bbcd (patch) | |
tree | cef5c71fedb71b1e9d24df5f58bded565ba1691d /Python/compile.c | |
parent | 4aef41ffe7bee84f3b6440f4d76099cd030d058b (diff) | |
download | cpython-7bcabc60a36eb5910bd162d54ece449f5249bbcd.zip cpython-7bcabc60a36eb5910bd162d54ece449f5249bbcd.tar.gz cpython-7bcabc60a36eb5910bd162d54ece449f5249bbcd.tar.bz2 |
Fix a few more memory leaks
Document more info about the benefits of configuring without
pymalloc when running valgrind
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c index 4d637ae..5905c45 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2384,7 +2384,10 @@ compiler_import_as(struct compiler *c, identifier name, identifier asname) 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; } } |