From 695443f8d5e0da5fbff3b44279a0ed6abafdf3bb Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 26 Feb 2007 10:57:20 +0000 Subject: Use GLib memory allocation functions --- hcid/dbus-test.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'hcid/dbus-test.c') 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) { -- cgit