splay: add another assert for detected usage problem

Closes #18199
This commit is contained in:
Daniel Stenberg 2025-08-06 08:12:08 +02:00
parent a1e4e81431
commit aec28f3ad3
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -223,6 +223,7 @@ int Curl_splayremove(struct Curl_tree *t,
if(compare(SPLAY_SUBNODE, removenode->key) == 0) {
/* It is a subnode within a 'same' linked list and thus we can unlink it
easily. */
DEBUGASSERT(removenode->samen != removenode);
if(removenode->samen == removenode)
/* A non-subnode should never be set to SPLAY_SUBNODE */
return 3;