summaryrefslogtreecommitdiff
path: root/scripts/git.orderFile
diff options
context:
space:
mode:
authorlonglong yan <yanlonglong@kylinos.cn>2026-06-03 15:27:41 +0800
committerAntonio Quartulli <antonio@openvpn.net>2026-07-20 15:49:55 +0200
commit0bd9cfebc1c91e1066e56d6261b99691b9df6008 (patch)
tree947bdbb34672b32608401496d2c2bab08300a053 /scripts/git.orderFile
parenta4710ae2e7e322fdaefb4be8604228279cfaf48c (diff)
selftests/net: ovpn: fix getaddrinfo memory leak in ovpn_parse_remote()
The ovpn_parse_remote() function has two memory management issues: 1. When both 'host' and 'vpnip' are non-NULL, the first getaddrinfo() allocation is leaked because 'result' is overwritten by the second getaddrinfo() call without freeing the first allocation. 2. When both 'host' and 'vpnip' are NULL, 'result' is an uninitialized stack variable passed to freeaddrinfo(), which is undefined behavior. Fix by initializing 'result' to NULL and calling freeaddrinfo() after the first getaddrinfo() result is consumed. Fixes: 959bc330a439 ("testing/selftests: add test tool and scripts for ovpn module") Signed-off-by: longlong yan <yanlonglong@kylinos.cn> Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Diffstat (limited to 'scripts/git.orderFile')
0 files changed, 0 insertions, 0 deletions