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
c74c4574
Commit
c74c4574
authored
Jun 03, 2012
by
Martin Blix Grydeland
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Free the LRU object and set free_offset when dropping empty segments in smp_close_seg()
Fixes: #1146
parent
1f172c75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
storage_persistent_silo.c
bin/varnishd/storage/storage_persistent_silo.c
+6
-2
No files found.
bin/varnishd/storage/storage_persistent_silo.c
View file @
c74c4574
...
...
@@ -253,9 +253,13 @@ smp_close_seg(struct smp_sc *sc, struct smp_seg *sg)
sc
->
cur_seg
=
NULL
;
if
(
sg
->
nalloc
==
0
)
{
/*
XXX: i
f segment is empty, delete instead */
/*
I
f segment is empty, delete instead */
VTAILQ_REMOVE
(
&
sc
->
segments
,
sg
,
list
);
free
(
sg
);
assert
(
sg
->
p
.
offset
>=
sc
->
ident
->
stuff
[
SMP_SPC_STUFF
]);
assert
(
sg
->
p
.
offset
<
sc
->
mediasize
);
sc
->
free_offset
=
sg
->
p
.
offset
;
LRU_Free
(
sg
->
lru
);
FREE_OBJ
(
sg
);
return
;
}
...
...
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