fix refleak

This commit is contained in:
Benjamin Peterson 2012-07-09 22:21:55 -07:00
parent 7d30b80a4e
commit 66f3659c9e
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}