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.
diff --git a/src/mworker-prog.c b/src/mworker-prog.c
index 8d404cb..acf84b0 100644
--- a/src/mworker-prog.c
+++ b/src/mworker-prog.c
@@ -307,18 +307,14 @@
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);