In the function, vubr_new, calloc was converted to g_new0.

Signed-off-by: jiputer <[email protected]>
---

This patch belongs to this issue:
https://gitlab.com/qemu-project/qemu/-/work_items/1798

 contrib/vhost-user-bridge/vhost-user-bridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/vhost-user-bridge/vhost-user-bridge.c 
b/contrib/vhost-user-bridge/vhost-user-bridge.c
index a6f7ec226c..e3b979b462 100644
--- a/contrib/vhost-user-bridge/vhost-user-bridge.c
+++ b/contrib/vhost-user-bridge/vhost-user-bridge.c
@@ -540,7 +540,7 @@ vubr_accept_cb(int sock, void *ctx)
 static VubrDev *
 vubr_new(const char *path, bool client)
 {
-    VubrDev *dev = (VubrDev *) calloc(1, sizeof(VubrDev));
+    VubrDev *dev = g_new0(VubrDev, 1);
     struct sockaddr_un un;
     CallbackFunc cb;
     size_t len;
-- 
2.43.0


Reply via email to