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
a309f194
Commit
a309f194
authored
Jul 29, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make a dedicated cleanup function for req->vary_? to match the
dedicated setup function we have. Fixes #1553
parent
398d7c6e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
cache.h
bin/varnishd/cache/cache.h
+1
-0
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+2
-3
cache_vary.c
bin/varnishd/cache/cache_vary.c
+12
-0
No files found.
bin/varnishd/cache/cache.h
View file @
a309f194
...
...
@@ -1143,6 +1143,7 @@ int VRY_Create(struct busyobj *bo, struct vsb **psb);
int
VRY_Match
(
struct
req
*
,
const
uint8_t
*
vary
);
unsigned
VRY_Validate
(
const
uint8_t
*
vary
);
void
VRY_Prep
(
struct
req
*
);
void
VRY_Clear
(
struct
req
*
);
enum
vry_finish_flag
{
KEEP
,
DISCARD
};
void
VRY_Finish
(
struct
req
*
req
,
enum
vry_finish_flag
);
...
...
bin/varnishd/cache/cache_req_fsm.c
View file @
a309f194
...
...
@@ -469,8 +469,7 @@ cnt_lookup(struct worker *wrk, struct req *req)
if
(
boc
!=
NULL
)
{
(
void
)
HSH_DerefObjCore
(
&
wrk
->
stats
,
&
boc
);
free
(
req
->
vary_b
);
req
->
vary_b
=
NULL
;
VRY_Clear
(
req
);
}
return
(
REQ_FSM_MORE
);
...
...
@@ -524,7 +523,7 @@ cnt_miss(struct worker *wrk, struct req *req)
default:
WRONG
(
"Illegal return from vcl_miss{}"
);
}
free
(
req
->
vary_b
);
VRY_Clear
(
req
);
if
(
o
!=
NULL
)
(
void
)
HSH_DerefObj
(
&
wrk
->
stats
,
&
o
);
AZ
(
HSH_DerefObjCore
(
&
wrk
->
stats
,
&
req
->
objcore
));
...
...
bin/varnishd/cache/cache_vary.c
View file @
a309f194
...
...
@@ -238,6 +238,18 @@ VRY_Prep(struct req *req)
req
->
vary_b
[
2
]
=
'\0'
;
}
void
VRY_Clear
(
struct
req
*
req
)
{
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
if
(
req
->
vary_b
!=
NULL
)
free
(
req
->
vary_b
);
req
->
vary_b
=
NULL
;
AZ
(
req
->
vary_e
);
AZ
(
req
->
vary_l
);
}
/**********************************************************************
* Finish predictive vary processing
*/
...
...
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