Commit a33d77f
committed
Fix leak of resolved address list in snmp_session_init()
When php_network_getaddresses() succeeds but none of the resolved
addresses yield a usable peer name (for example bracketed IPv6 syntax
over an IPv4-only host), snmp_session_init() returned without calling
php_network_freeaddresses(), leaking the address list on every such call.
Free it on that error path as the success path already does.
Closes GH-223401 parent a480965 commit a33d77f
2 files changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
| 913 | + | |
913 | 914 | | |
914 | 915 | | |
915 | 916 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
0 commit comments