Commit 154e8a5
dns: Fix memory leak in dns_server_addr_parse
When the DNS server's address count is already full (exceeds the
limit of 8), the function returned early without freeing the
successfully resolved addrinfo struct. Fix this by checking the
limit before executing the DNS lookup.
Github: #1055
Change-Id: I7ec318c86af994284d1c6272e3bbe2b1ede160fd
Signed-off-by: saddamr3e <saddamr3e@gmail.com>
Acked-by: Heiko Hund <heiko@openvpn.net>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1712
Message-Id: <20260618061835.16448-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg37209.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>1 parent 1281d26 commit 154e8a5
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
| 117 | + | |
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
122 | 121 | | |
123 | | - | |
| 122 | + | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
0 commit comments