Fix memory leak when registration fails

registration_data_t is not freed if the server does not respond to the
connection message or the user decides to quit the (Wakaama) client
before the server respond.

This fixes #693.
This commit is contained in:
Parminder Singh 2023-04-19 14:48:30 +01:00 committed by Reto Schneider
parent f4bf6394fe
commit 4fcb0b55dc

View File

@ -173,6 +173,9 @@ void prv_deleteTransactionList(lwm2m_context_t * context)
transaction = context->transactionList;
context->transactionList = context->transactionList->next;
if (transaction->callback) {
transaction->callback(context, transaction, NULL);
}
transaction_free(transaction);
}
}