connect_thread_func() sets a variable to null, then error_propagate()s an Error * to it. This is a roundabout way to assign the Error * to it, so replace it by just that.
Signed-off-by: Markus Armbruster <[email protected]> --- nbd/client-connection.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nbd/client-connection.c b/nbd/client-connection.c index 79ea97e4cc..6a4f080717 100644 --- a/nbd/client-connection.c +++ b/nbd/client-connection.c @@ -207,8 +207,7 @@ static void *connect_thread_func(void *opaque) qemu_mutex_lock(&conn->mutex); error_free(conn->err); - conn->err = NULL; - error_propagate(&conn->err, local_err); + conn->err = local_err; if (ret < 0) { object_unref(OBJECT(conn->sioc)); -- 2.49.0
