Module: kamailio Branch: master Commit: d0a353342b559191aafc732174773e132554694a URL: https://github.com/kamailio/kamailio/commit/d0a353342b559191aafc732174773e132554694a
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2023-11-21T13:57:52+01:00 core/mem: tlsf - cast to char* for pointer operations --- Modified: src/core/mem/tlsf_malloc.c --- Diff: https://github.com/kamailio/kamailio/commit/d0a353342b559191aafc732174773e132554694a.diff Patch: https://github.com/kamailio/kamailio/commit/d0a353342b559191aafc732174773e132554694a.patch --- diff --git a/src/core/mem/tlsf_malloc.c b/src/core/mem/tlsf_malloc.c index f7cdeab5eec..e599f84aff9 100644 --- a/src/core/mem/tlsf_malloc.c +++ b/src/core/mem/tlsf_malloc.c @@ -1058,9 +1058,10 @@ void tlsf_free(tlsf_t tlsf, void *ptr) control->allocated -= block_size(block); control->real_used -= (block_size(block) - + (ptr - - (void *)block - /* prev_phys_block is melted in the previous block when the current block is used */ + + ((char *)ptr + - (char *)block + /* prev_phys_block is melted in the previous + * block when the current block is used */ + sizeof(block->prev_phys_block))); #ifdef DBG_TLSF_MALLOC block->alloc_info.file = file; _______________________________________________ Kamailio (SER) - Development Mailing List To unsubscribe send an email to [email protected]
