summaryrefslogtreecommitdiff
path: root/tests/wocky-test-connector-server.c
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2010-10-08 17:10:27 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.co.uk>2010-10-13 11:28:10 -0400
commit14df6aef00ab2880bb86ac86f88b9193ea8848cc (patch)
tree213041591789c0504afc5e6d82316e9e2cbe795a /tests/wocky-test-connector-server.c
parentf4e0ce027040dff5c7ddcb0cec62b2e4d3c02cf5 (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.c5
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);
}