We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23cbc4e commit da8cdeaCopy full SHA for da8cdea
1 file changed
libvncclient/sasl.c
@@ -128,6 +128,8 @@ static int password_callback_adapt(sasl_conn_t *conn,
128
129
strcpy((char *)lsec->data, password);
130
lsec->len = strlen(password);
131
+ if (client->saslSecret)
132
+ free(client->saslSecret);
133
client->saslSecret = lsec;
134
*secret = lsec;
135
@@ -170,7 +172,8 @@ HandleSASLAuth(rfbClient *client)
170
172
char *wantmech;
171
173
const char *mechname;
174
- client->saslconn = NULL;
175
+ if (client->saslconn)
176
+ sasl_dispose(&client->saslconn);
177
178
/* Sets up the SASL library as a whole */
179
err = sasl_client_init(NULL);
0 commit comments