cyrus-sasl/cyrus-sasl-2.1.26-sample-leak.patch
2015-03-12 16:31:30 +01:00

14 lines
425 B
Diff

diff --git a/sample/server.c b/sample/server.c
index f5aff68..6c684af 100644
--- a/sample/server.c
+++ b/sample/server.c
@@ -227,6 +227,8 @@ int mysasl_negotiate(FILE *in, FILE *out, sasl_conn_t *conn)
/* send capability list to client */
send_string(out, data, len);
+ if (mech)
+ free(data);
dprintf(1, "waiting for client mechanism...\n");
len = recv_string(in, chosenmech, sizeof chosenmech);