diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2006-09-21 15:59:25 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2006-09-21 15:59:25 +0000 |
commit | d9ebfa690ef6258b40d784ed213a0ee1e55a4fea (patch) | |
tree | 1eeacf352203bbe3ba019f23aae263f5e9af7c81 /hcid/dbus-rfcomm.c | |
parent | c01205fa5a60824b7bf6a945d1dbc4a7656f2005 (diff) |
Fix memory leak in Bind and Connect methods
Diffstat (limited to 'hcid/dbus-rfcomm.c')
-rw-r--r-- | hcid/dbus-rfcomm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hcid/dbus-rfcomm.c b/hcid/dbus-rfcomm.c index 558d2c5d..64b0580d 100644 --- a/hcid/dbus-rfcomm.c +++ b/hcid/dbus-rfcomm.c @@ -727,14 +727,14 @@ static DBusHandlerResult rfcomm_connect_req(DBusConnection *conn, return error_invalid_arguments(conn, msg); } - if (!err) - return DBUS_HANDLER_RESULT_HANDLED; - if (uuid) free(uuid); if (handle) free(handle); + if (!err) + return DBUS_HANDLER_RESULT_HANDLED; + rfcomm_continue_data_free(cdata); return error_failed(conn, msg, err); @@ -952,14 +952,14 @@ static DBusHandlerResult rfcomm_bind_req(DBusConnection *conn, return error_invalid_arguments(conn, msg); } - if (!err) - return DBUS_HANDLER_RESULT_HANDLED; - if (uuid) free(uuid); if (handle) free(handle); + if (!err) + return DBUS_HANDLER_RESULT_HANDLED; + rfcomm_continue_data_free(cdata); return error_failed(conn, msg, err); |