Diff between 793fb9ed655c80b43791b46874e7d4525c17eb92 and db5d83d6f3b897066a818f45c57cc3120e7f4e96

Changed Files

File Additions Deletions Status
src/device.c +1 -8 modified

Full Patch

diff --git a/src/device.c b/src/device.c
index c5222ee..3cfb816 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3740,17 +3740,10 @@ static void display_pincode_cb(struct agent *agent, DBusError *err, void *data)
 	struct authentication_req *auth = data;
 	struct btd_device *device = auth->device;
 
-	/* No need to reply anything if the authentication already failed */
-	if (auth->agent == NULL)
-		return;
-
-	pincode_cb(agent, err, auth->pincode, device);
+	pincode_cb(agent, err, auth->pincode, auth);
 
 	g_free(device->authr->pincode);
 	device->authr->pincode = NULL;
-
-	agent_unref(device->authr->agent);
-	device->authr->agent = NULL;
 }
 
 static struct authentication_req *new_auth(struct btd_device *device,