qga: report error on keyfile dump error
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Cc:qemu-trivial@nongnu.org Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
This commit is contained in:
parent
f8837b3765
commit
cbcd9ba1b7
@ -1074,7 +1074,12 @@ static void config_dump(GAConfig *config)
|
||||
g_free(tmp);
|
||||
|
||||
tmp = g_key_file_to_data(keyfile, NULL, &error);
|
||||
printf("%s", tmp);
|
||||
if (error) {
|
||||
g_critical("Failed to dump keyfile: %s", error->message);
|
||||
g_clear_error(&error);
|
||||
} else {
|
||||
printf("%s", tmp);
|
||||
}
|
||||
|
||||
g_free(tmp);
|
||||
g_key_file_free(keyfile);
|
||||
|
Loading…
Reference in New Issue
Block a user