mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
CLEANUP: mworker: simplify mworker_free_child()
Remove useless checks and simplify the function.
This commit is contained in:
parent
cfa2d5648f
commit
08cb945a9b
@ -603,26 +603,17 @@ out:
|
|||||||
|
|
||||||
void mworker_free_child(struct mworker_proc *child)
|
void mworker_free_child(struct mworker_proc *child)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
if (child == NULL)
|
if (child == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (child->command) {
|
for (i = 0; child->command && child->command[i]; i++)
|
||||||
int i;
|
ha_free(&child->command[i]);
|
||||||
|
|
||||||
for (i = 0; child->command[i]; i++) {
|
ha_free(&child->command);
|
||||||
if (child->command[i]) {
|
ha_free(&child->id);
|
||||||
ha_free(&child->command[i]);
|
ha_free(&child->version);
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
ha_free(&child->command);
|
|
||||||
}
|
|
||||||
if (child->id) {
|
|
||||||
ha_free(&child->id);
|
|
||||||
}
|
|
||||||
if (child->version) {
|
|
||||||
ha_free(&child->version);
|
|
||||||
}
|
|
||||||
free(child);
|
free(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user