diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-07-10 05:21:55 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-07-10 05:21:55 (GMT) |
commit | 66f3659c9e3f1103426bee64c1cc950025e97ade (patch) | |
tree | 1b8cb30187ae2c73484e0056d2b3f19a84e96b0f /Python/import.c | |
parent | 7d30b80a4e668c3be26b6b1dabd4b7329447c1f9 (diff) | |
download | cpython-66f3659c9e3f1103426bee64c1cc950025e97ade.zip cpython-66f3659c9e3f1103426bee64c1cc950025e97ade.tar.gz cpython-66f3659c9e3f1103426bee64c1cc950025e97ade.tar.bz2 |
fix refleak
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c index 4ae8abf..aeaa9c0 100644 --- a/Python/import.c +++ b/Python/import.c @@ -431,7 +431,9 @@ PyImport_GetMagicNumber(void) "_RAW_MAGIC_NUMBER"); if (pyc_magic == NULL) return -1; - return PyLong_AsLong(pyc_magic); + long res = PyLong_AsLong(pyc_magic); + Py_DECREF(pyc_magic); + return res; } |