qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-stable] [PULL 4/4] vhost-user: delete net client if necessary


From: Jason Wang
Subject: [Qemu-stable] [PULL 4/4] vhost-user: delete net client if necessary
Date: Fri, 15 Jun 2018 11:01:23 +0800

From: linzhecheng <address@hidden>

As qemu_new_net_client create new ncs but error happens later,
ncs will be left in global net_clients list and we can't use them any
more, so we need to cleanup them.

Cc: address@hidden
Signed-off-by: linzhecheng <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
---
 net/vhost-user.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/vhost-user.c b/net/vhost-user.c
index 608b837..a39f9c9 100644
--- a/net/vhost-user.c
+++ b/net/vhost-user.c
@@ -345,6 +345,9 @@ err:
             s->vhost_user = NULL;
         }
     }
+    if (nc0) {
+        qemu_del_net_client(nc0);
+    }
 
     return -1;
 }
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]