Commit 2f0d0801 authored by Frediano Ziglio's avatar Frediano Ziglio

iso-dialog: Fix leak and quoting

Do not leak memory in case of task cancelled.
Quote "msg" in case it contains some no-xml character that could
came from translated strings.
Signed-off-by: Frediano Ziglio's avatarFrediano Ziglio <[email protected]>
parent 8297a178
Pipeline #165267822 passed with stages
in 34 minutes and 44 seconds
......@@ -154,12 +154,13 @@ fetch_iso_names_cb(OvirtForeignMenu *foreign_menu,
if (!iso_list) {
const gchar *msg = error ? error->message : _("No ISO files in domain");
gchar *markup = g_strdup_printf("<b>%s</b>", msg);
gchar *markup;
g_debug("Error fetching ISO names: %s", msg);
if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
goto end;
markup = g_markup_printf_escaped("<b>%s</b>", msg);
gtk_label_set_markup(GTK_LABEL(self->status), markup);
gtk_spinner_stop(GTK_SPINNER(self->spinner));
remote_viewer_iso_list_dialog_show_error(self, msg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment