summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@netsurf-browser.org>2009-02-15 13:32:48 (GMT)
committer Daniel Silverstone <dsilvers@netsurf-browser.org>2009-02-15 13:32:48 (GMT)
commit751e77d0b31ff335d1575217388ffe8469dc862d (patch)
treedf66bf4f8479728dd93da25838148001d5de950a
parent16f2a149486163c2fad9597d0d875d011a4b8fb8 (diff)
downloadlibwapcaplet-751e77d0b31ff335d1575217388ffe8469dc862d.tar.gz
libwapcaplet-751e77d0b31ff335d1575217388ffe8469dc862d.tar.bz2
In debug mode, poison freed strings to highlight missing refs
svn path=/trunk/libwapcaplet/; revision=6533
-rw-r--r--src/libwapcaplet.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libwapcaplet.c b/src/libwapcaplet.c
index c125390..80585f3 100644
--- a/src/libwapcaplet.c
+++ b/src/libwapcaplet.c
@@ -227,6 +227,10 @@ lwc_context_string_unref(lwc_context *ctx, lwc_string *str)
if (str->insensitive != NULL && str->refcnt == 0)
lwc_context_string_unref(ctx, str->insensitive);
+#ifndef NDEBUG
+ memset(str, 0xA5, sizeof(*str) + str->len);
+#endif
+
LWC_FREE(str);
}