From b78bb417ebfd992ce007dc7334b1c0979786ec11 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 16 Feb 2018 00:03:18 -0500 Subject: [PATCH] error: Copy location information in error_copy() Commit 1e9b65bb forgot to propagate source information to copied errors. Backports commit 88e2ce291595ed8f12636b40523fdb215a9d3374 from qemu --- qemu/util/error.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qemu/util/error.c b/qemu/util/error.c index 4af889f4..becaee1c 100644 --- a/qemu/util/error.c +++ b/qemu/util/error.c @@ -123,6 +123,9 @@ Error *error_copy(const Error *err) err_new = g_malloc0(sizeof(*err)); err_new->msg = g_strdup(err->msg); err_new->err_class = err->err_class; + err_new->src = err->src; + err_new->line = err->line; + err_new->func = err->func; return err_new; }