mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-15 20:39:44 -04:00
CLEANUP: mworker: remove duplicate pointer tests in cfg_parse_program()
As reported in issue #1017, there are two harmless duplicate tests in cfg_parse_program(), one made of a "if" using the same condition as the loop it's in, and the other one being a null test before a free. This just removes them. No backport is needed.
This commit is contained in:
parent
5ce5a1586d
commit
8f7efcddd6
1 changed files with 4 additions and 8 deletions
|
|
@ -307,18 +307,14 @@ error:
|
|||
int i;
|
||||
|
||||
for (i = 0; ext_child->command[i]; i++) {
|
||||
if (ext_child->command[i]) {
|
||||
free(ext_child->command[i]);
|
||||
ext_child->command[i] = NULL;
|
||||
}
|
||||
free(ext_child->command[i]);
|
||||
ext_child->command[i] = NULL;
|
||||
}
|
||||
free(ext_child->command);
|
||||
ext_child->command = NULL;
|
||||
}
|
||||
if (ext_child->id) {
|
||||
free(ext_child->id);
|
||||
ext_child->id = NULL;
|
||||
}
|
||||
free(ext_child->id);
|
||||
ext_child->id = NULL;
|
||||
}
|
||||
|
||||
free(ext_child);
|
||||
|
|
|
|||
Loading…
Reference in a new issue