Commit 716aac0
committed
PySocket_getaddrinfo(): fix two refcount bugs, both having to do with
a misunderstanding of the refcont behavior of the 'O' format code in
PyArg_ParseTuple() and Py_BuildValue(), respectively.
- pobj is only a borrowed reference, so should *not* be DECREF'ed at
the end. This was the cause of SF bug #470635.
- The Py_BuildValue() call would leak the object produced by
makesockaddr(). (I found this by eyeballing the code.)1 parent 27b7f9f commit 716aac0
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2377 | 2377 | | |
2378 | 2378 | | |
2379 | 2379 | | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
2380 | 2384 | | |
2381 | 2385 | | |
2382 | 2386 | | |
2383 | | - | |
| 2387 | + | |
| 2388 | + | |
2384 | 2389 | | |
2385 | 2390 | | |
2386 | 2391 | | |
2387 | 2392 | | |
2388 | 2393 | | |
2389 | 2394 | | |
2390 | 2395 | | |
2391 | | - | |
2392 | 2396 | | |
2393 | 2397 | | |
2394 | 2398 | | |
2395 | 2399 | | |
2396 | | - | |
2397 | 2400 | | |
2398 | 2401 | | |
2399 | 2402 | | |
| |||
0 commit comments