]> source.dussan.org Git - rspamd.git/commitdiff
Do not try dereference NULL pointer.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 19 May 2015 14:37:02 +0000 (15:37 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 19 May 2015 15:29:21 +0000 (16:29 +0100)
src/libutil/radix.c

index 3ca4c87162f19b392c8061a8d7a373222dbe9d86..39fc39445b4ef02f9dcc24716cf552333afe6dca 100644 (file)
@@ -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