mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-29 17:20:34 +00:00
Clear GError in cleanup section
This commit is contained in:
parent
1bcd8d0fe6
commit
526e882368
@ -134,7 +134,6 @@ main(int argc, char **argv)
|
||||
g_printerr(_("%s\nRun '%s --help' to see a full list of available command line options\n"),
|
||||
error->message, base_name);
|
||||
g_free(base_name);
|
||||
g_error_free(error);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -177,7 +176,6 @@ main(int argc, char **argv)
|
||||
if (!virt_viewer_app_start(app, &error)) {
|
||||
if (g_error_matches(error, VIRT_VIEWER_ERROR, VIRT_VIEWER_ERROR_CANCELLED))
|
||||
ret = 0;
|
||||
g_clear_error(&error);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -193,6 +191,7 @@ main(int argc, char **argv)
|
||||
if (viewer)
|
||||
g_object_unref(viewer);
|
||||
g_strfreev(args);
|
||||
g_clear_error(&error);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -98,7 +98,6 @@ int main(int argc, char **argv)
|
||||
if (error) {
|
||||
g_printerr("%s\n%s\n",
|
||||
error->message, help_msg);
|
||||
g_error_free(error);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -116,7 +115,6 @@ int main(int argc, char **argv)
|
||||
if (!virt_viewer_app_start(VIRT_VIEWER_APP(viewer), &error)) {
|
||||
if (g_error_matches(error, VIRT_VIEWER_ERROR, VIRT_VIEWER_ERROR_CANCELLED))
|
||||
ret = 0;
|
||||
g_clear_error(&error);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -130,6 +128,7 @@ int main(int argc, char **argv)
|
||||
g_free(uri);
|
||||
g_strfreev(args);
|
||||
g_free(help_msg);
|
||||
g_clear_error(&error);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user