mirror of git://git.musl-libc.org/musl
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…
Reference in New Issue