summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2013-05-02 12:01:34 +0200
committerStef Walter <stefw@redhat.com>2013-05-02 12:01:34 +0200
commit00e99ec714bba89c2c484fd90c12de600b7c0de0 (patch)
treee04d3efdf81aaf8b91458839ff91d3bdc3c290c5
parent384c262faa085791a06cd56d837d2fb394860120 (diff)
Fix use of freed memory
-rw-r--r--library/adconn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/adconn.c b/library/adconn.c
index 0367279..7db5dcf 100644
--- a/library/adconn.c
+++ b/library/adconn.c
@@ -811,12 +811,12 @@ connect_and_lookup_naming (adcli_conn *conn,
conn->ldap = ldap;
- adcli_conn_set_domain_controller (conn, disco->host_addr);
-
free (conn->canonical_host);
conn->canonical_host = strdup (canonical_host);
return_unexpected_if_fail (conn->canonical_host != NULL);
+ adcli_conn_set_domain_controller (conn, disco->host_addr);
+
return ADCLI_SUCCESS;
}