Skip to content

Commit

Permalink
util/error: do not free error on error_abort
Browse files Browse the repository at this point in the history
It would be nice to have Error object not freed away when debugging a
coredump.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20190415142519.73060-1-vsementsov@virtuozzo.com>
[error_printf_unless_qmp() replaced by error_printf()]
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
  • Loading branch information
Vladimir Sementsov-Ogievskiy authored and Markus Armbruster committed Apr 17, 2019
1 parent 4c8b7c8 commit b922c05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion util/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ static void error_handle_fatal(Error **errp, Error *err)
if (errp == &error_abort) {
fprintf(stderr, "Unexpected error in %s() at %s:%d:\n",
err->func, err->src, err->line);
error_report_err(err);
error_report("%s", error_get_pretty(err));
if (err->hint) {
error_printf("%s", err->hint->str);
}
abort();
}
if (errp == &error_fatal) {
Expand Down

0 comments on commit b922c05

Please sign in to comment.