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

Tim Wiederhake posted 21 patches 5 years, 5 months ago
There is a newer version of this series
[libvirt PATCH 08/21] util: Use glib memory functions in virThreadCreateFull
Posted by Tim Wiederhake 5 years, 5 months ago
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

Re: [libvirt PATCH 08/21] util: Use glib memory functions in virThreadCreateFull
Posted by Ján Tomko 5 years, 5 months ago
On a Friday in 2020, Tim Wiederhake wrote:
>Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
>---
> src/util/virthread.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano