Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvdp-pesi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
uplex-varnish
libvdp-pesi
Commits
3616d98b
Commit
3616d98b
authored
Jul 30, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
split out fini from free
parent
c7ef2f41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
vdp_pesi.c
src/vdp_pesi.c
+16
-11
No files found.
src/vdp_pesi.c
View file @
3616d98b
...
...
@@ -469,19 +469,9 @@ node_alloc(void)
return
(
node
);
}
/* recursively free all nodes == free the tree */
static
void
node_f
ree
(
struct
req
*
req
,
struct
node
*
node
)
node_f
ini
(
struct
req
*
req
,
struct
node
*
node
)
{
struct
node
*
child
,
*
tmp
;
AN
(
mempool
);
MPL_AssertSane
(
node
);
if
(
node
->
type
==
T_NEXUS
)
VSTAILQ_FOREACH_SAFE
(
child
,
&
node
->
nexus
.
children
,
sibling
,
tmp
)
node_free
(
req
,
child
);
switch
(
node
->
type
)
{
case
T_FINAL
:
fini_final
(
req
,
node
);
...
...
@@ -503,7 +493,22 @@ node_free(struct req *req, struct node *node)
default:
INCOMPL
();
}
}
/* recursively free all nodes == free the tree */
static
void
node_free
(
struct
req
*
req
,
struct
node
*
node
)
{
struct
node
*
child
,
*
tmp
;
AN
(
mempool
);
MPL_AssertSane
(
node
);
if
(
node
->
type
==
T_NEXUS
)
VSTAILQ_FOREACH_SAFE
(
child
,
&
node
->
nexus
.
children
,
sibling
,
tmp
)
node_free
(
req
,
child
);
node_fini
(
req
,
node
);
MPL_Free
(
mempool
,
node
);
}
...
...
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