From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxdxS-0004NP-P3 for qemu-devel@nongnu.org; Thu, 19 Jun 2014 11:09:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxdxL-0004Qe-Qr for qemu-devel@nongnu.org; Thu, 19 Jun 2014 11:08:58 -0400 Received: from mail-we0-f170.google.com ([74.125.82.170]:43013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxdxL-0004QX-Lm for qemu-devel@nongnu.org; Thu, 19 Jun 2014 11:08:51 -0400 Received: by mail-we0-f170.google.com with SMTP id w61so2542321wes.1 for ; Thu, 19 Jun 2014 08:08:51 -0700 (PDT) From: Nikolay Nikolaev Date: Thu, 19 Jun 2014 18:08:43 +0300 Message-ID: <20140619150830.10499.78682.stgit@3820> In-Reply-To: <20140619150355.10499.53297.stgit@3820> References: <20140619150355.10499.53297.stgit@3820> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 5/6] vhost: fix migration_blocker initialization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: snabb-devel@googlegroups.com, qemu-devel@nongnu.org, mst@redhat.com Cc: tech@virtualopensystems.com, n.nikolaev@virtualopensystems.com error_set expect errp to be a NULL initialized pointer. Signed-off-by: Nikolay Nikolaev --- hw/virtio/vhost.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index c44c15c..e55fe1c 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -857,12 +857,11 @@ int vhost_dev_init(struct vhost_dev *hdev, void *opaque, .eventfd_del = vhost_eventfd_del, .priority = 10 }; + hdev->migration_blocker = NULL; if (!(hdev->features & (0x1 << VHOST_F_LOG_ALL))) { error_setg(&hdev->migration_blocker, "Migration disabled: vhost lacks VHOST_F_LOG_ALL feature."); migrate_add_blocker(hdev->migration_blocker); - } else { - hdev->migration_blocker = NULL; } hdev->mem = g_malloc0(offsetof(struct vhost_memory, regions)); hdev->n_mem_sections = 0;