Skip to content

Commit

Permalink
Fix memory leak when registration fails
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
parmi93 committed Aug 16, 2023
1 parent 1166233 commit a78f9cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/liblwm2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit a78f9cb

Please sign in to comment.