kopia lustrzana https://github.com/micropython/micropython
mimxrt/mbedtls: Add NULL pointer check in m_free_mbedtls.
Signed-off-by: Peter Züger <zueger.peter@icloud.com>pull/8425/head
rodzic
95ee29f4f4
commit
94a9b50668
|
@ -64,6 +64,9 @@ void *m_calloc_mbedtls(size_t nmemb, size_t size) {
|
|||
}
|
||||
|
||||
void m_free_mbedtls(void *ptr_in) {
|
||||
if (ptr_in == NULL) {
|
||||
return;
|
||||
}
|
||||
void **ptr = &((void **)ptr_in)[-2];
|
||||
#if DEBUG
|
||||
uint32_t nb;
|
||||
|
|
Ładowanie…
Reference in New Issue