summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-rfcomm.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-03-16 14:10:19 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-03-16 14:10:19 +0000
commit70af3d41686970fd767c16ea7d94a3acf56edce5 (patch)
tree09f1dc301dd788b108a33b912c56db6ac47ff84d /hcid/dbus-rfcomm.c
parent585bc7db19e7d4aac3f22607df3f7a1b20fbe506 (diff)
Fix memory leak in rfcomm_bind()
Diffstat (limited to 'hcid/dbus-rfcomm.c')
-rw-r--r--hcid/dbus-rfcomm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hcid/dbus-rfcomm.c b/hcid/dbus-rfcomm.c
index e51bdd5f..a4e029ef 100644
--- a/hcid/dbus-rfcomm.c
+++ b/hcid/dbus-rfcomm.c
@@ -131,6 +131,7 @@ static struct rfcomm_node *rfcomm_bind(bdaddr_t *src, const char *bda, uint8_t c
if (err)
*err = errno;
error("RFCOMMCREATEDEV failed: %s (%d)", strerror(errno), errno);
+ free(node);
return NULL;
}
@@ -140,7 +141,6 @@ static struct rfcomm_node *rfcomm_bind(bdaddr_t *src, const char *bda, uint8_t c
return node;
}
-
static DBusHandlerResult rfcomm_connect_req(DBusConnection *conn,
DBusMessage *msg, void *data)
{