diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2010-10-08 17:10:27 -0400 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> | 2010-10-13 11:28:10 -0400 |
commit | 14df6aef00ab2880bb86ac86f88b9193ea8848cc (patch) | |
tree | 213041591789c0504afc5e6d82316e9e2cbe795a /tests/wocky-test-connector-server.c | |
parent | f4e0ce027040dff5c7ddcb0cec62b2e4d3c02cf5 (diff) |
Don't leak SASLServer by overwriting it
Diffstat (limited to 'tests/wocky-test-connector-server.c')
-rw-r--r-- | tests/wocky-test-connector-server.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/wocky-test-connector-server.c b/tests/wocky-test-connector-server.c index 72776d5..b13987d 100644 --- a/tests/wocky-test-connector-server.c +++ b/tests/wocky-test-connector-server.c @@ -1285,8 +1285,9 @@ feature_stanza (TestConnectorServer *self) if (priv->problem.sasl != SERVER_PROBLEM_NO_SASL) { - priv->sasl = test_sasl_auth_server_new (NULL, priv->mech, - priv->user, priv->pass, NULL, priv->problem.sasl, FALSE); + if (priv->sasl == NULL) + priv->sasl = test_sasl_auth_server_new (NULL, priv->mech, + priv->user, priv->pass, NULL, priv->problem.sasl, FALSE); test_sasl_auth_server_set_mechs (G_OBJECT (priv->sasl), feat); } |