changeset 720:ff724f45162a

Add th_ioctx::memData NULL check in th_mem_realloc() as well.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 11 Nov 2020 15:08:03 +0200
parents d51c277bea6b
children c834e1393eb0
files th_ioctx_mem.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/th_ioctx_mem.c	Wed Nov 11 13:35:03 2020 +0200
+++ b/th_ioctx_mem.c	Wed Nov 11 15:08:03 2020 +0200
@@ -65,6 +65,9 @@
         return FALSE;
     }
 
+    if (ctx->memData == NULL)
+        ctx->memAlloc = 0;
+
     // Check against max size
     if (ctx->maxSize > 0 && newSize > ctx->maxSize)
     {