Message ID | 20190719202119.24792-2-eblake@redhat.com |
---|---|
State | New |
Headers | show |
Series | [PULL,1/1] nbd: Initialize reply on failure | expand |
diff --git a/block/nbd.c b/block/nbd.c index 81edabbf35ed..57c1a205811a 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -640,12 +640,11 @@ static coroutine_fn int nbd_co_receive_one_chunk( request_ret, qiov, payload, errp); if (ret < 0) { + memset(reply, 0, sizeof(*reply)); s->quit = true; } else { /* For assert at loop start in nbd_connection_entry */ - if (reply) { - *reply = s->reply; - } + *reply = s->reply; s->reply.handle = 0; }