summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-security.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-02-26 11:14:53 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-02-26 11:14:53 +0000
commit21a038269e8e2264b149e50355e6e18ccba1d334 (patch)
tree6e50133395bbfba07de60a23f8da501eeca26c41 /hcid/dbus-security.c
parent695443f8d5e0da5fbff3b44279a0ed6abafdf3bb (diff)
More glib memory allocation changes
Diffstat (limited to 'hcid/dbus-security.c')
-rw-r--r--hcid/dbus-security.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/hcid/dbus-security.c b/hcid/dbus-security.c
index ee3b96eb..07a9490f 100644
--- a/hcid/dbus-security.c
+++ b/hcid/dbus-security.c
@@ -200,7 +200,7 @@ static struct passkey_agent *passkey_agent_new(struct adapter *adapter, DBusConn
agent->path = g_strdup(path);
if (addr)
- agent->addr = strdup(addr);
+ agent->addr = g_strdup(addr);
agent->conn = dbus_connection_ref(conn);
@@ -1039,9 +1039,7 @@ static int call_passkey_agent(DBusConnection *conn,
bacpy(&req->sba, sba);
bacpy(&req->bda, dba);
req->agent = agent;
- req->path = strdup(path);
- if (!req->path)
- goto failed;
+ req->path = g_strdup(path);
req->call = agent_request(path, dba, agent, FALSE, 0);
if (!req->call)
@@ -1217,12 +1215,8 @@ static int call_confirm_agent(DBusConnection *conn,
bacpy(&req->sba, sba);
bacpy(&req->bda, dba);
req->agent = agent;
- req->path = strdup(path);
- if (!req->path)
- goto failed;
- req->pin = strdup(pin);
- if (!req->pin)
- goto failed;
+ req->path = g_strdup(path);
+ req->pin = g_strdup(pin);
req->call = agent_confirm(path, dba, agent, pin);
if (!req->call)