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
164378c5
Commit
164378c5
authored
Sep 04, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix and test a refcount leak
parent
129be2f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+2
-1
b00020.vtc
bin/varnishtest/tests/b00020.vtc
+7
-0
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
164378c5
...
...
@@ -370,6 +370,7 @@ cnt_fetch(struct worker *wrk, struct req *req)
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
->
objcore
,
OBJCORE_MAGIC
);
AZ
(
req
->
obj
);
req
->
acct_req
.
fetch
++
;
...
...
@@ -378,7 +379,7 @@ cnt_fetch(struct worker *wrk, struct req *req)
if
(
req
->
objcore
->
flags
&
OC_F_FAILED
)
{
req
->
err_code
=
503
;
req
->
req_step
=
R_STP_ERROR
;
//XXX ? AZ(HSH_DerefObjCore(&wrk->stats, &req->objcore)
);
(
void
)
HSH_DerefObjCore
(
&
wrk
->
stats
,
&
req
->
objcore
);
req
->
objcore
=
NULL
;
return
(
REQ_FSM_MORE
);
}
...
...
bin/varnishtest/tests/b00020.vtc
View file @
164378c5
...
...
@@ -22,6 +22,9 @@ client c1 {
expect resp.status == 503
} -run
varnish v1 -expect n_object == 0
varnish v1 -expect n_objectcore == 0
server s1 {
rxreq
send "HTTP/1.1 200 Ok\r\nConnection: close\r\n\r\n"
...
...
@@ -36,3 +39,7 @@ client c1 {
rxresp
expect resp.status == 200
} -run
varnish v1 -expect n_object == 1
varnish v1 -expect n_objectcore == 1
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