summaryrefslogtreecommitdiff
path: root/src/search
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-08-02 21:20:33 -0400
committerRich Felker <dalias@aerifal.cx>2013-08-02 21:20:33 -0400
commitd3a98ff69a41d96d0a73f1d5b686f73a03a2f9df (patch)
tree93bee159d258534a80a02f2b31e37f8c472f9f62 /src/search
parent2d2da648f6aa07cfca3d6065d9126897e42927a1 (diff)
downloadmusl-d3a98ff69a41d96d0a73f1d5b686f73a03a2f9df.tar.gz
musl-d3a98ff69a41d96d0a73f1d5b686f73a03a2f9df.tar.bz2
musl-d3a98ff69a41d96d0a73f1d5b686f73a03a2f9df.tar.xz
musl-d3a98ff69a41d96d0a73f1d5b686f73a03a2f9df.zip
make tdestroy allow null function pointer if no destructor is needed
this change is to align with a change in the glibc interface.
Diffstat (limited to 'src/search')
-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);
}