diff mbox series

[11/88] Cryptodev Backends: use g_new() family of functions

Message ID 20171006235023.11952-12-f4bug@amsat.org
State New
Headers show
Series use g_new() family of functions | expand

Commit Message

Philippe Mathieu-Daudé Oct. 6, 2017, 11:49 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 backends/cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/backends/cryptodev.c b/backends/cryptodev.c
index 67edfa5328..44f693f58b 100644
--- a/backends/cryptodev.c
+++ b/backends/cryptodev.c
@@ -42,7 +42,7 @@  cryptodev_backend_new_client(const char *model,
 {
     CryptoDevBackendClient *cc;
 
-    cc = g_malloc0(sizeof(CryptoDevBackendClient));
+    cc = g_new0(CryptoDevBackendClient, 1);
     cc->model = g_strdup(model);
     if (name) {
         cc->name = g_strdup(name);