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:
Willy Tarreau 2021-01-05 15:58:37 +01:00
parent 5ce5a1586d
commit 8f7efcddd6

View File

@ -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);