summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-09-07 14:59:40 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-09-07 14:59:40 +0100
commit5b1700a8917065508336c1318414daa6abb7ace2 (patch)
treeac1f80c00946fee424d8fcf61c18f823620ec5a3 /include
parent130c1dec2842b5a7f1256816b58ea4d41726c950 (diff)
downloadlibwapcaplet-5b1700a8917065508336c1318414daa6abb7ace2.tar.gz
Remove global context if no strings leak
If when we iterate the context there're no strings, then we can delete the context too, which reduces false-positives on leak checkers. Closes #2490 Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'include')
-rw-r--r--include/libwapcaplet/libwapcaplet.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libwapcaplet/libwapcaplet.h b/include/libwapcaplet/libwapcaplet.h
index d8cc841..e4c2cc9 100644
--- a/include/libwapcaplet/libwapcaplet.h
+++ b/include/libwapcaplet/libwapcaplet.h
@@ -278,6 +278,10 @@ static inline lwc_error lwc_string_caseless_hash_value(
/**
* Iterate the context and return every string in it.
*
+ * If there are no strings found in the context, then this has the
+ * side effect of removing the global context which will reduce the
+ * chances of false-positives on leak checkers.
+ *
* @param cb The callback to give the string to.
* @param pw The private word for the callback.
*/