WTP can join w/o any memory leaks

This commit is contained in:
2022-08-15 16:31:26 +02:00
parent df5e2bcbb7
commit a051ba41de
17 changed files with 119 additions and 99 deletions

View File

@ -22,7 +22,7 @@
#include "msgset.h"
#include "mavltypes.h"
#include "dtls.h"
/**
@ -937,6 +937,7 @@ int cw_read_messages(struct cw_Conn *conn)
*/
void conn_destroy(struct cw_Conn * conn)
{
dtls_shutdown(conn);
if (conn->fragman)
fragman_destroy(conn->fragman);
if (conn->q)
@ -954,6 +955,8 @@ void conn_destroy(struct cw_Conn * conn)
if (conn->local_cfg)
cw_cfg_destroy(conn->local_cfg);
free(conn);
}