Commit 58ca33b
authored
bpo-1635741: Fix ref leak in _PyWarnings_Init() error path (GH-23151)
Replace PyModule_AddObject() with PyModule_AddObjectRef() in the
_warnings module to fix a reference leak on error.
Use also PyModule_AddObjectRef() in importdl.c.1 parent 18ce7f1 commit 58ca33b
2 files changed
+5
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1395 | 1395 | | |
1396 | 1396 | | |
1397 | 1397 | | |
1398 | | - | |
1399 | | - | |
| 1398 | + | |
1400 | 1399 | | |
1401 | 1400 | | |
1402 | | - | |
1403 | | - | |
1404 | | - | |
| 1401 | + | |
1405 | 1402 | | |
1406 | 1403 | | |
1407 | | - | |
1408 | | - | |
1409 | | - | |
| 1404 | + | |
1410 | 1405 | | |
1411 | 1406 | | |
1412 | 1407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
224 | 224 | | |
225 | | - | |
226 | | - | |
| 225 | + | |
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
| |||
0 commit comments