mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-05-28 04:03:29 -04:00
dco_freebsd: Add check_malloc_return after realloc
cppcheck complained about a potential memleak
due to realloc failure. But trying to handle that
is probably not useful. Just abort like we do
for other malloc failures.
Change-Id: Icd8ea093dfe9f1888570f3d7b786b951b5262e47
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1669
Message-Id: <20260507075321.25123-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg36842.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
(cherry picked from commit fcc34b1352)
This commit is contained in:
parent
f50d2e140b
commit
1a15b3fa51
1 changed files with 1 additions and 0 deletions
|
|
@ -842,6 +842,7 @@ dco_get_peer_stats_multi(dco_context_t *dco, const bool raise_sigusr1_on_err)
|
|||
|
||||
retry:
|
||||
buf = realloc(buf, buf_size);
|
||||
check_malloc_return(buf);
|
||||
drv.ifd_len = buf_size;
|
||||
drv.ifd_data = buf;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue