[master] c676ca46d additional cleanup for the binheap test

Nils Goroll nils.goroll at uplex.de
Tue Aug 4 05:12:04 UTC 2020


commit c676ca46d19ca31aad3e9c5de991516ad04822ac
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Jul 29 09:52:54 2020 +0200

    additional cleanup for the binheap test
    
    by Dridi, thank you

diff --git a/lib/libvarnish/binary_heap.c b/lib/libvarnish/binary_heap.c
index f31093f98..0896ed14c 100644
--- a/lib/libvarnish/binary_heap.c
+++ b/lib/libvarnish/binary_heap.c
@@ -538,14 +538,6 @@ vrnd_lock(void)
 {
 }
 
-#if defined(__SANITIZER) || __has_feature(address_sanitizer)
-int __lsan_is_turned_off(void);
-int __lsan_is_turned_off(void)
-{
-	return (1);
-}
-
-#endif
 int
 main(void)
 {
@@ -649,8 +641,10 @@ main(void)
 		}
 		fprintf(stderr, "%d updates OK\n", M);
 	}
-	while ((fp = binheap_root(bh)) != NULL)
+	while ((fp = binheap_root(bh)) != NULL) {
 		binheap_delete(bh, fp->idx);
+		FREE_OBJ(fp);
+	}
 	binheap_destroy(&bh);
 	AZ(bh);
 	return (0);


More information about the varnish-commit mailing list