summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-database.c4
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);