mirror of
https://git.musl-libc.org/git/musl
synced 2025-02-13 08:44:08 +03:00
make tdestroy allow null function pointer if no destructor is needed
this change is to align with a change in the glibc interface.
This commit is contained in:
parent
2d2da648f6
commit
d3a98ff69a
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user