agent-manager: don't handle failure of nm_secret_agent_new() in agent_manager_register_with_capabilities()

This never fails. There is no need to handle an "error".
This commit is contained in:
Thomas Haller 2019-12-23 09:21:23 +01:00
parent 2dcd9fa836
commit eba629fb07

View file

@ -397,12 +397,6 @@ agent_manager_register_with_capabilities (NMAgentManager *self,
/* Success, add the new agent */
agent = nm_secret_agent_new (context, subject, identifier, capabilities);
if (!agent) {
error = g_error_new_literal (NM_AGENT_MANAGER_ERROR,
NM_AGENT_MANAGER_ERROR_FAILED,
"Failed to initialize the agent");
goto done;
}
g_signal_connect (agent, NM_SECRET_AGENT_DISCONNECTED,
G_CALLBACK (agent_disconnected_cb), self);