]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
splay: add another assert for detected usage problem
authorDaniel Stenberg <daniel@haxx.se>
Wed, 6 Aug 2025 06:12:08 +0000 (08:12 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 6 Aug 2025 06:42:39 +0000 (08:42 +0200)
Closes #18199

lib/splay.c

index 609b799bfd1a54e01907f9b2b0281b62e975e495..3ca8678b2b2fcb3788b7a61eb673d3335242ace0 100644 (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;