Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
cffcca55
Commit
cffcca55
authored
Apr 13, 2018
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Plug some leaks
parent
ec0f8199
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
5 deletions
+19
-5
vtc.c
bin/varnishtest/vtc.c
+1
-1
vtc_haproxy.c
bin/varnishtest/vtc_haproxy.c
+6
-3
vtc_http.c
bin/varnishtest/vtc_http.c
+6
-1
vtc_logexp.c
bin/varnishtest/vtc_logexp.c
+1
-0
vtc_process.c
bin/varnishtest/vtc_process.c
+5
-0
No files found.
bin/varnishtest/vtc.c
View file @
cffcca55
...
...
@@ -167,7 +167,7 @@ macro_undef(struct vtclog *vl, const char *instance, const char *name)
VTAILQ_REMOVE
(
&
macro_list
,
m
,
list
);
free
(
m
->
name
);
free
(
m
->
val
);
free
(
m
);
FREE_OBJ
(
m
);
}
AZ
(
pthread_mutex_unlock
(
&
macro_mtx
));
}
...
...
bin/varnishtest/vtc_haproxy.c
View file @
cffcca55
...
...
@@ -56,7 +56,7 @@ struct haproxy {
struct
vtclog
*
vl
;
VTAILQ_ENTRY
(
haproxy
)
list
;
c
har
*
filename
;
c
onst
char
*
filename
;
struct
vsb
*
args
;
int
opt_worker
;
int
opt_daemon
;
...
...
@@ -72,7 +72,7 @@ struct haproxy {
int
expect_signal
;
int
its_dead_jim
;
c
onst
char
*
cli_fn
;
c
har
*
cli_fn
;
char
*
workdir
;
struct
vsb
*
msgs
;
...
...
@@ -152,7 +152,7 @@ haproxy_new(const char *name)
h
->
filename
=
getenv
(
HAPROXY_PROGRAM_ENV_VAR
);
if
(
h
->
filename
==
NULL
)
REPLACE
(
h
->
filename
,
"haproxy"
)
;
h
->
filename
=
"haproxy"
;
bprintf
(
buf
,
"${tmpdir}/%s"
,
name
);
vsb
=
macro_expand
(
h
->
vl
,
buf
);
...
...
@@ -196,6 +196,9 @@ haproxy_delete(struct haproxy *h)
free
(
h
->
name
);
free
(
h
->
workdir
);
free
(
h
->
cli_fn
);
free
(
h
->
cfg_fn
);
free
(
h
->
pid_fn
);
VSB_destroy
(
&
h
->
args
);
/* XXX: MEMLEAK (?) */
...
...
bin/varnishtest/vtc_http.c
View file @
cffcca55
...
...
@@ -884,6 +884,7 @@ http_tx_parse_args(char * const *av, struct vtclog *vl, struct http *hp,
}
}
else
if
(
!
strcmp
(
*
av
,
"-bodylen"
))
{
assert
(
body
==
nullbody
);
free
(
body
);
body
=
synth_body
(
av
[
1
],
0
);
bodylen
=
strlen
(
body
);
av
++
;
...
...
@@ -895,13 +896,16 @@ http_tx_parse_args(char * const *av, struct vtclog *vl, struct http *hp,
av
++
;
}
else
if
(
!
strcmp
(
*
av
,
"-gziplen"
))
{
assert
(
body
==
nullbody
);
free
(
body
);
b
=
synth_body
(
av
[
1
],
1
);
gzip_body
(
hp
,
b
,
&
body
,
&
bodylen
);
free
(
b
);
VSB_printf
(
hp
->
vsb
,
"Content-Encoding: gzip%s"
,
nl
);
// vtc_hexdump(hp->vl, 4, "gzip", (void*)body, bodylen);
av
++
;
}
else
if
(
!
strcmp
(
*
av
,
"-gzipbody"
))
{
assert
(
body
==
nullbody
);
free
(
body
);
gzip_body
(
hp
,
av
[
1
],
&
body
,
&
bodylen
);
VSB_printf
(
hp
->
vsb
,
"Content-Encoding: gzip%s"
,
nl
);
// vtc_hexdump(hp->vl, 4, "gzip", (void*)body, bodylen);
...
...
@@ -1911,7 +1915,8 @@ http_process(struct vtclog *vl, const char *spec, int sock, int *sfd,
free
(
hp
->
rxbuf
);
free
(
hp
->
rem_ip
);
free
(
hp
->
rem_port
);
free
(
hp
);
free
(
hp
->
rem_path
);
FREE_OBJ
(
hp
);
return
(
retval
);
}
...
...
bin/varnishtest/vtc_logexp.c
View file @
cffcca55
...
...
@@ -191,6 +191,7 @@ logexp_delete(struct logexp *le)
AZ
(
le
->
vslq
);
logexp_delete_tests
(
le
);
free
(
le
->
name
);
free
(
le
->
vname
);
free
(
le
->
query
);
VSM_Destroy
(
&
le
->
vsm
);
FREE_OBJ
(
le
);
...
...
bin/varnishtest/vtc_process.c
View file @
cffcca55
...
...
@@ -386,6 +386,7 @@ process_new(const char *name)
static
void
process_delete
(
struct
process
*
p
)
{
int
i
;
CHECK_OBJ_NOTNULL
(
p
,
PROCESS_MAGIC
);
AZ
(
pthread_mutex_destroy
(
&
p
->
mtx
));
...
...
@@ -401,6 +402,10 @@ process_delete(struct process *p)
* to the test's tmpdir.
*/
for
(
i
=
0
;
i
<
p
->
nlin
;
i
++
)
free
(
p
->
vram
[
i
]);
free
(
p
->
vram
);
/* XXX: MEMLEAK (?) */
FREE_OBJ
(
p
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment