When looking up the 'latest' caps they might not be present. Report an
error instead of crashing.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
if (STREQ(info->args.capsver, "latest")) {
capsfile = g_strdup(virHashLookup(info->conf->capslatest, info->args.capsarch));
+
+ if (!capsfile) {
+ fprintf(stderr, "'latest' caps for '%s' were not found\n", info->args.capsarch);
+ return -1;
+ }
+
stripmachinealiases = true;
} else {
capsfile = g_strdup_printf("%s/caps_%s.%s.xml",