Skip to content

Commit

Permalink
MLE service releases CCM library in error case (ARMmbed#1719)
Browse files Browse the repository at this point in the history
CCM libary is relased in error cases to avoid resource lock up.
  • Loading branch information
Arto Kinnunen authored May 28, 2018
1 parent d0467a0 commit 721c0b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/Service_Libs/mle_service/mle_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ static buffer_t *mle_service_message_security_decode(buffer_t *buf, mle_security
if (!ccm_ptr) {
return buffer_free(buf);
} else if (ccm_ptr->mic_len >= payload_len) {
ccm_process_run(NULL);
return buffer_free(buf);
}

Expand Down Expand Up @@ -507,6 +508,7 @@ static buffer_t *mle_message_security_header_set(buffer_t *buf,service_instance_
} else {
tr_warn("Security header alloc fail");
buf = (buffer_t *) 0;
ccm_process_run(NULL);
return buf;
}
}
Expand Down

0 comments on commit 721c0b0

Please sign in to comment.