diff options
| -rw-r--r-- | hcid/dbus-service.c | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c index 9a6a56ee..76d7660f 100644 --- a/hcid/dbus-service.c +++ b/hcid/dbus-service.c @@ -785,8 +785,12 @@ int unregister_service_agent(DBusConnection *conn, const char *sender, const cha  	debug("Unregistering service object: %s", path); -	if (dbus_connection_get_object_path_data(conn, path, (void *) &agent)) +	if (dbus_connection_get_object_path_data(conn, path, (void *) &agent)) { +		if (agent->records) +			unregister_agent_records(agent->records); +  		service_agent_free(agent); +	}  	if (!dbus_connection_unregister_object_path(conn, path))  		return -1;  | 
