Skip to content

Commit 5c6fbd0

Browse files
mrbffcron2
authored andcommitted
PUSH_UPDATE server: free temporary options after sending message
Clean up options on success and send failure to avoid leaking memory allocated while parsing outgoing updates. Change-Id: Ie4a7e0702a30d2a637c3dfe03f6c62d8a9901aae Signed-off-by: Marco Baffo <marco@mandelbit.com> Acked-by: Razvan Cojocaru <razvanc@mailbox.org> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1992 Message-Id: <20261013121338.27882-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg39864.html Signed-off-by: Gert Doering <gert@greenie.muc.de> (cherry picked from commit 103d803)
1 parent 28847bc commit 5c6fbd0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎src/openvpn/push_util.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ send_single_push_update(struct multi_context *m, struct multi_instance *mi, stru
165165
{
166166
if (!send_control_channel_string(c, BSTR(&e->buf), D_PUSH))
167167
{
168+
uninit_options(&o);
168169
return false;
169170
}
170171

@@ -219,6 +220,7 @@ send_single_push_update(struct multi_context *m, struct multi_instance *mi, stru
219220
update_vhash(m, mi, o.ifconfig_local, o.ifconfig_ipv6_local);
220221
}
221222

223+
uninit_options(&o);
222224
return true;
223225
}
224226

0 commit comments

Comments
 (0)