projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8f5ec4
)
init_domain_components(): Assert that the http->dbuffer and http->dvec are NULL
master
author
Fabian Keil
<fk@fabiankeil.de>
Sun, 4 May 2025 13:13:06 +0000
(15:13 +0200)
committer
Fabian Keil
<fk@fabiankeil.de>
Wed, 18 Jun 2025 03:48:30 +0000
(
05:48
+0200)
To detect memory leaks earlier.
urlmatch.c
patch
|
blob
|
history
diff --git
a/urlmatch.c
b/urlmatch.c
index
b213c3e
..
7682c9e
100644
(file)
--- 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);