/* Check for invalid keys. */
for (s = tmp; s && *s; s++) {
if (strcasecmp(*s, "NAME") && strcasecmp(*s, "STATE") &&
- strcasecmp(*s, "PID") && strcasecmp(*s, "RAM") &&
- strcasecmp(*s, "SWAP") && strcasecmp(*s, "AUTOSTART") &&
- strcasecmp(*s, "GROUPS") && strcasecmp(*s, "INTERFACE") &&
- strcasecmp(*s, "IPV4") && strcasecmp(*s, "IPV6")) {
+ strcasecmp(*s, "PID") && strcasecmp(*s, "RAM") &&
+ strcasecmp(*s, "SWAP") && strcasecmp(*s, "AUTOSTART") &&
+ strcasecmp(*s, "GROUPS") && strcasecmp(*s, "INTERFACE") &&
+ strcasecmp(*s, "IPV4") && strcasecmp(*s, "IPV6")) {
+ lxc_free_array((void **)tmp, free);
fprintf(stderr, "Invalid key: %s\n", *s);
return;
}
}
printf("\n");
}
+
+ lxc_free_array((void **)tmp, free);
}
static void ls_print_table(struct ls *l, struct lengths *lht,