# HG changeset patch
# User Olaf Wintermann <olaf.wintermann@gmail.com>
# Date 1729704816 -7200
# Node ID 2a47b4a5c21651f487c6ca37d8a53e6b037ff129
# Parent  b428424c02142ce6152c6ae627c3af4a151d962f
fix cx_mempool_free crash if ptr is null

diff -r b428424c0214 -r 2a47b4a5c216 src/mempool.c
--- a/src/mempool.c	Tue Oct 22 23:10:31 2024 +0200
+++ b/src/mempool.c	Wed Oct 23 19:33:36 2024 +0200
@@ -113,6 +113,7 @@
         void *p,
         void *ptr
 ) {
+    if (!ptr) return;
     struct cx_mempool_s *pool = p;
 
     struct cx_mempool_memory_s *mem = (struct cx_mempool_memory_s *)