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

[libvirt PATCH 08/21] util: Use glib memory functions in virThreadCreateFull



Signed-off-by: Tim Wiederhake <twiederh redhat com>
---
 src/util/virthread.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/util/virthread.c b/src/util/virthread.c
index 7f23399835..814f5313aa 100644
--- a/src/util/virthread.c
+++ b/src/util/virthread.c
@@ -253,11 +253,8 @@ int virThreadCreateFull(virThreadPtr thread,
 
     if ((err = pthread_attr_init(&attr)) != 0)
         goto cleanup;
-    if (VIR_ALLOC_QUIET(args) < 0) {
-        err = ENOMEM;
-        goto cleanup;
-    }
 
+    args = g_new0(struct virThreadArgs, 1);
     args->func = func;
     args->name = g_strdup(name);
     args->worker = worker;
-- 
2.26.2


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