Skip to content

Commit

Permalink
master: test-auth-client - Fix duplicate server connection deinit.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch committed Mar 8, 2019
1 parent 37268b8 commit 9434b7f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/master/test-auth-client.c
Expand Up @@ -351,7 +351,6 @@ test_auth_handshake_auth_plain(struct server_connection *conn, unsigned int id,

if (count != 2) {
i_error("Bad AUTH PLAIN request: Bad data");
server_connection_deinit(&conn);
return FALSE;
}

Expand Down Expand Up @@ -382,7 +381,6 @@ test_auth_handshake_auth_login(struct server_connection *conn, unsigned int id,
if (data_size != 0) {
i_error("Bad AUTH PLAIN request: "
"Not expecting initial response");
server_connection_deinit(&conn);
return FALSE;
}

Expand Down Expand Up @@ -448,7 +446,6 @@ test_auth_handshake_auth(struct server_connection *conn, unsigned int id,

if (args[0] == NULL) {
i_error("Bad AUTH request");
server_connection_deinit(&conn);
return FALSE;
}
mech = args[0];
Expand All @@ -463,7 +460,6 @@ test_auth_handshake_auth(struct server_connection *conn, unsigned int id,
if (resp != NULL) {
if (base64_decode(resp, strlen(resp), NULL, data) < 0) {
i_error("Bad AUTH request: Bad base64");
server_connection_deinit(&conn);
return FALSE;
}
}
Expand All @@ -476,7 +472,6 @@ test_auth_handshake_auth(struct server_connection *conn, unsigned int id,
data->data, data->used);
}
i_error("Bad AUTH request: Unknown mechanism");
server_connection_deinit(&conn);
return FALSE;
}

Expand All @@ -492,15 +487,13 @@ test_auth_handshake_cont(struct server_connection *conn, unsigned int id,

if (args[0] == NULL) {
i_error("Bad CONT request");
server_connection_deinit(&conn);
return FALSE;
}
resp = args[0];
data = t_buffer_create(256);
if (resp != NULL) {
if (base64_decode(resp, strlen(resp), NULL, data) < 0) {
i_error("Bad CONT request: Bad base64");
server_connection_deinit(&conn);
return FALSE;
}
}
Expand All @@ -514,7 +507,6 @@ test_auth_handshake_cont(struct server_connection *conn, unsigned int id,

if (req == NULL) {
i_error("Bad CONT request: Bad request ID");
server_connection_deinit(&conn);
return FALSE;
}

Expand Down

0 comments on commit 9434b7f

Please sign in to comment.