Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 72423:7a48e98915f2 3.2
- Issue #13021: Missing decref on an error path. Thanks to Suman Saha for
finding the bug and providing a patch.
| author | Barry Warsaw <barry@python.org> |
|---|---|
| date | Tue, 20 Sep 2011 14:45:44 -0400 |
| parents | 7089afd69a1a |
| children | 150e096095e5 ad0804d3dbd0 |
comparison
equal
deleted
inserted
replaced
| 72417:99b808c94834 | 72423:7a48e98915f2 |
|---|---|
| 1239 return -1; | 1239 return -1; |
| 1240 if (PyDict_SetItemString(d, "__file__", f) < 0) { | 1240 if (PyDict_SetItemString(d, "__file__", f) < 0) { |
| 1241 Py_DECREF(f); | 1241 Py_DECREF(f); |
| 1242 return -1; | 1242 return -1; |
| 1243 } | 1243 } |
| 1244 if (PyDict_SetItemString(d, "__cached__", Py_None) < 0) | 1244 if (PyDict_SetItemString(d, "__cached__", Py_None) < 0) { |
| 1245 Py_DECREF(f); | |
| 1245 return -1; | 1246 return -1; |
| 1247 } | |
| 1246 set_file_name = 1; | 1248 set_file_name = 1; |
| 1247 Py_DECREF(f); | 1249 Py_DECREF(f); |
| 1248 } | 1250 } |
| 1249 len = strlen(filename); | 1251 len = strlen(filename); |
| 1250 ext = filename + len - (len > 4 ? 4 : 0); | 1252 ext = filename + len - (len > 4 ? 4 : 0); |
