[Privoxy-commits] [privoxy] 09/09: init_domain_components(): Assert that the http->dbuffer and http->dvec are NULL
User Git
git at git.privoxy.org
Wed Jun 18 05:47:06 CEST 2025
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit 44f9f5cf5846213dacba1821229c97941e1646a3
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Sun May 4 15:13:06 2025 +0200
init_domain_components(): Assert that the http->dbuffer and http->dvec are NULL
To detect memory leaks earlier.
---
urlmatch.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/urlmatch.c b/urlmatch.c
index b213c3eb..7682c9e0 100644
--- a/urlmatch.c
+++ b/urlmatch.c
@@ -122,6 +122,7 @@ jb_err init_domain_components(struct http_request *http)
size_t size;
char *p;
+ assert(http->dbuffer == NULL);
http->dbuffer = strdup_or_die(http->host);
/* map to lower case */
@@ -146,6 +147,7 @@ jb_err init_domain_components(struct http_request *http)
/* save a copy of the pointers in dvec */
size = (size_t)http->dcount * sizeof(*http->dvec);
+ assert(http->dvec == NULL);
http->dvec = malloc_or_die(size);
memcpy(http->dvec, vec, size);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list