summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-test.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-02-26 10:57:20 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-02-26 10:57:20 +0000
commit695443f8d5e0da5fbff3b44279a0ed6abafdf3bb (patch)
tree9b5c355ed0daa832cf50ad1d9b1f9f32a7b75366 /hcid/dbus-test.c
parent89bf31abc697eab5a05bd508a352193c73991476 (diff)
Use GLib memory allocation functions
Diffstat (limited to 'hcid/dbus-test.c')
-rw-r--r--hcid/dbus-test.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hcid/dbus-test.c b/hcid/dbus-test.c
index 78766a49..1794f276 100644
--- a/hcid/dbus-test.c
+++ b/hcid/dbus-test.c
@@ -93,10 +93,7 @@ static struct audit *audit_new(DBusConnection *conn, DBusMessage *msg,
path = dbus_message_get_path(msg);
requestor = dbus_message_get_sender(msg);
- audit = malloc(sizeof(struct audit));
- if (!audit)
- return NULL;
- memset(audit, 0, sizeof(struct audit));
+ audit = g_new0(struct audit, 1);
audit->requestor = strdup(requestor);
if (!audit->requestor) {