From 00e99ec714bba89c2c484fd90c12de600b7c0de0 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 2 May 2013 12:01:34 +0200 Subject: Fix use of freed memory --- library/adconn.c | 4 ++-- 1 file 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; } -- cgit v1.2.3