提交 cbcd9ba1 编写于 作者: M Marc-André Lureau 提交者: Michael Roth

qga: report error on keyfile dump error

Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Cc:qemu-trivial@nongnu.org
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 f8837b37
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册