From: Vsevolod Stakhov Date: Tue, 19 May 2015 14:37:02 +0000 (+0100) Subject: Do not try dereference NULL pointer. X-Git-Tag: 0.9.2~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0583ca87da55b9d83d9cbd8b3c42ff0237f8d457;p=rspamd.git Do not try dereference NULL pointer. --- diff --git a/src/libutil/radix.c b/src/libutil/radix.c index 3ca4c8716..39fc39445 100644 --- a/src/libutil/radix.c +++ b/src/libutil/radix.c @@ -537,8 +537,10 @@ radix_create_compressed (void) void radix_destroy_compressed (radix_compressed_t *tree) { - rspamd_mempool_delete (tree->pool); - g_slice_free1 (sizeof (*tree), tree); + if (tree) { + rspamd_mempool_delete (tree->pool); + g_slice_free1 (sizeof (*tree), tree); + } } uintptr_t