There's no reason to copy mechname into mechlist to use mechlist instead of mechname. Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- server/red-stream.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/server/red-stream.c b/server/red-stream.c index 5ddf8c54c..55e2c3e02 100644 --- a/server/red-stream.c +++ b/server/red-stream.c @@ -886,9 +886,9 @@ RedSaslError red_sasl_handle_auth_start(RedStream *stream, AsyncReadDone read_cb } spice_debug("Start SASL auth with mechanism %s. Data %p (%d bytes)", - sasl->mechlist, clientdata, datalen); + sasl->mechname, clientdata, datalen); err = sasl_server_start(sasl->conn, - sasl->mechlist, + sasl->mechname, clientdata, datalen, &serverout, @@ -1001,9 +1001,6 @@ bool red_sasl_handle_auth_mechname(RedStream *stream, AsyncReadDone read_cb, voi } } - g_free(sasl->mechlist); - sasl->mechlist = g_strdup(sasl->mechname); - spice_debug("Validated mechname '%s'", sasl->mechname); red_stream_async_read(stream, (uint8_t *)&sasl->len, sizeof(uint32_t), -- 2.14.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel