[gnome-keyring/wip/cosimoc/gdbus-fixes: 9/11] dbus: use g_memdup()



commit ec4216448381cadd9920d1382725fa1848f3b8ac
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Aug 15 12:57:59 2015 -0700

    dbus: use g_memdup()
    
    Instead of g_strndup(), for consistency with other similar code above.

 daemon/dbus/gkd-secret-secret.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/daemon/dbus/gkd-secret-secret.c b/daemon/dbus/gkd-secret-secret.c
index 5a59c2e..8fb0ef0 100644
--- a/daemon/dbus/gkd-secret-secret.c
+++ b/daemon/dbus/gkd-secret-secret.c
@@ -113,9 +113,9 @@ gkd_secret_secret_parse (GkdSecretService *service,
 
        secret = g_slice_new0 (GkdSecretSecret);
        secret->session = g_object_ref (session);
-       secret->parameter = g_strndup (parameter, n_parameter);
+       secret->parameter = g_memdup (parameter, n_parameter);
        secret->n_parameter = n_parameter;
-       secret->value = g_strndup (value, n_value);
+       secret->value = g_memdup (value, n_value);
        secret->n_value = n_value;
 
  out:


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