You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
355 B

  1. diff --git a/lib/memory_mosq.c b/lib/memory_mosq.c
  2. index b1f5bfd..4d8217d 100644
  3. --- a/lib/memory_mosq.c
  4. +++ b/lib/memory_mosq.c
  5. @@ -54,6 +54,9 @@ void *mosquitto__calloc(size_t nmemb, size_t size)
  6. void mosquitto__free(void *mem)
  7. {
  8. #ifdef REAL_WITH_MEMORY_TRACKING
  9. + if(!mem){
  10. + return;
  11. + }
  12. memcount -= malloc_usable_size(mem);
  13. #endif
  14. free(mem);