diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-06-25 11:53:05 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-06-25 11:53:05 +0000 |
commit | ab9d441d9df8c1e3bffb82cdfe53f1601a7ed883 (patch) | |
tree | 585580f4d626055ff79a2b80b1df0bee0a6f0685 /hcid/dbus-database.c | |
parent | b5caa9eb0417feb6ef6ceec1cde12a1af3305777 (diff) |
UpdateServiceRecord: fixed memory leak on failure
Diffstat (limited to 'hcid/dbus-database.c')
-rw-r--r-- | hcid/dbus-database.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hcid/dbus-database.c b/hcid/dbus-database.c index 8dd327d1..5b9effe7 100644 --- a/hcid/dbus-database.c +++ b/hcid/dbus-database.c @@ -259,8 +259,10 @@ static DBusHandlerResult update_service_record(DBusConnection *conn, } if (sdp_server_enable) { - if (remove_record_from_server(handle) < 0) + if (remove_record_from_server(handle) < 0) { + sdp_record_free(sdp_record); return error_not_available(conn, msg); + } sdp_record->handle = handle; err = add_record_to_server(sdp_record); |