summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/search/tdestroy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/search/tdestroy.c b/src/search/tdestroy.c
index 6f430bda..5f9e197d 100644
--- a/src/search/tdestroy.c
+++ b/src/search/tdestroy.c
@@ -16,6 +16,6 @@ void tdestroy(void *root, void (*freekey)(void *))
return;
tdestroy(r->left, freekey);
tdestroy(r->right, freekey);
- freekey(r->key);
+ if (freekey) freekey(r->key);
free(r);
}