diff options
author | 2006-04-04 11:21:50 +0000 | |
---|---|---|
committer | 2006-04-04 11:21:50 +0000 | |
commit | 2e6f60c16b348ead623d2047a563b9451e8fbf56 (patch) | |
tree | 7ae045a1d97f12b8d018d56bb1fde400b41060a8 /lib/libc/stdlib/tsearch.3 | |
parent | Fix a comment (diff) | |
download | wireguard-openbsd-2e6f60c16b348ead623d2047a563b9451e8fbf56.tar.xz wireguard-openbsd-2e6f60c16b348ead623d2047a563b9451e8fbf56.zip |
When tdelete() is used to delete the root node, don't return a
pointer to the freed root node, but return a pointer to the new
root node. POSIX does not define, what should be returned in
that case.
Fixes Coverity CID 2528.
ok millert@ otto@
Diffstat (limited to 'lib/libc/stdlib/tsearch.3')
-rw-r--r-- | lib/libc/stdlib/tsearch.3 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/tsearch.3 b/lib/libc/stdlib/tsearch.3 index 589f0574a88..ebc521ba17f 100644 --- a/lib/libc/stdlib/tsearch.3 +++ b/lib/libc/stdlib/tsearch.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tsearch.3,v 1.13 2006/01/30 19:50:41 jmc Exp $ +.\" $OpenBSD: tsearch.3,v 1.14 2006/04/04 11:21:50 moritz Exp $ .\" .\" Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> .\" @@ -74,7 +74,7 @@ and .Fn tsearch . If the node to be deleted is the root of the binary search tree, .Fa rootp -will be adjusted. +will be adjusted and a pointer to the new root will be returned. .Pp .Fn twalk walks the binary search tree rooted in |