- if (err != NULL) {
- BT_ERR("Could not remove session: %s\n", err->message);
- g_error_free(err);
- return BLUETOOTH_ERROR_INTERNAL;
+ if (!result) {
+ if (err) {
+ BT_ERR("Could not remove session: %s\n", err->message);
+ g_error_free(err);
+ return BLUETOOTH_ERROR_INTERNAL;
+ }