diff options
| -rw-r--r-- | input/manager.c | 9 | ||||
| -rw-r--r-- | input/server.c | 8 | 
2 files changed, 5 insertions, 12 deletions
diff --git a/input/manager.c b/input/manager.c index b7cfc117..41bafd20 100644 --- a/input/manager.c +++ b/input/manager.c @@ -143,6 +143,7 @@ static int get_record(struct pending_req *pr, uint32_t handle,  	}  	dbus_pending_call_set_notify(pending, cb, pr, NULL); +	dbus_pending_call_unref(pending);  	dbus_message_unref(msg);  	return 0; @@ -173,6 +174,7 @@ static int get_handles(struct pending_req *pr, const char *uuid,  	}  	dbus_pending_call_set_notify(pending, cb, pr, NULL); +	dbus_pending_call_unref(pending);  	dbus_message_unref(msg);  	return 0; @@ -431,14 +433,12 @@ static void hid_record_reply(DBusPendingCall *call, void *data)  	}  	dbus_message_unref(reply); -	dbus_pending_call_unref(call);  	return;  fail:  	dbus_error_free(&derr);  	pending_req_free(pr);  	dbus_message_unref(reply); -	dbus_pending_call_unref(call);  }  static void hid_handle_reply(DBusPendingCall *call, void *data) @@ -491,7 +491,6 @@ fail:  done:  	dbus_message_unref(reply); -	dbus_pending_call_unref(call);  }  static void pnp_record_reply(DBusPendingCall *call, void *data) @@ -545,7 +544,6 @@ fail:  done:  	dbus_message_unref(reply); -	dbus_pending_call_unref(call);  }  static void pnp_handle_reply(DBusPendingCall *call, void *data) @@ -602,7 +600,6 @@ fail:  done:  	dbus_message_unref(reply); -	dbus_pending_call_unref(call);  }  static void headset_record_reply(DBusPendingCall *call, void *data) @@ -689,7 +686,6 @@ fail:  	dbus_error_free(&derr);  	pending_req_free(pr);  	dbus_message_unref(reply); -	dbus_pending_call_unref(call);  }  static void headset_handle_reply(DBusPendingCall *call, void *data) @@ -742,7 +738,6 @@ fail:  done:  	dbus_message_unref(reply); -	dbus_pending_call_unref(call);  }  static int path_bdaddr_cmp(const char *path, const bdaddr_t *bdaddr) diff --git a/input/server.c b/input/server.c index d4bf977f..2fb4e68f 100644 --- a/input/server.c +++ b/input/server.c @@ -177,14 +177,11 @@ static void authorization_callback(DBusPendingCall *pcall, void *data)  		close(session->ctrl_sk);  		g_free(session); - -		goto failed; +	} else { +		create_device(session);  	} -	create_device(session); -failed:  	dbus_message_unref(reply); -	dbus_pending_call_unref(pcall);  }  static int authorize_device(struct session_data *session) @@ -214,6 +211,7 @@ static int authorize_device(struct session_data *session)  		return -EACCES;  	dbus_pending_call_set_notify(pending, authorization_callback, session, NULL); +	dbus_pending_call_unref(pending);  	dbus_message_unref(msg);  	return 0;  | 
