DCO: fix memory leak in dco_get_peer_stats_multi for Linux

Leaks a small amount of memory every 15s.

Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
Acked-by: Antonio Quartulli <a@unstable.cc>
Message-Id: <20230515142116.33135-1-frank@lichtenheld.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26659.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
Frank Lichtenheld 2023-05-15 16:21:16 +02:00 committed by Gert Doering
parent cf496476b3
commit 276f7c86d7

View file

@ -925,7 +925,10 @@ dco_get_peer_stats_multi(dco_context_t *dco, struct multi_context *m)
nlmsg_hdr(nl_msg)->nlmsg_flags |= NLM_F_DUMP;
return ovpn_nl_msg_send(dco, nl_msg, dco_parse_peer_multi, m, __func__);
int ret = ovpn_nl_msg_send(dco, nl_msg, dco_parse_peer_multi, m, __func__);
nlmsg_free(nl_msg);
return ret;
}
static int