error: Copy location information in error_copy()

Commit 1e9b65bb forgot to propagate source information to copied
errors.

Backports commit 88e2ce291595ed8f12636b40523fdb215a9d3374 from qemu
This commit is contained in:
Eric Blake 2018-02-16 00:03:18 -05:00 committed by Lioncash
parent 011861cd0e
commit b78bb417eb
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -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;
}