projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d2da64
)
make tdestroy allow null function pointer if no destructor is needed
author
Rich Felker
<dalias@aerifal.cx>
Sat, 3 Aug 2013 01:20:33 +0000
(21:20 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 3 Aug 2013 01:20:33 +0000
(21:20 -0400)
this change is to align with a change in the glibc interface.
src/search/tdestroy.c
patch
|
blob
|
history
diff --git
a/src/search/tdestroy.c
b/src/search/tdestroy.c
index 6f430bda182c948950b24a3886932df7f1321cb1..5f9e197dcd1ea57869a0aa74f3c57d010ec163c6 100644
(file)
--- 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);
}