configure: Fix typo when enabling CPAN modules as dependency
[strongswan.git] / src / libpttls / pt_tls_dispatcher.c
index 4699516..5c30637 100644 (file)
@@ -185,7 +185,7 @@ pt_tls_dispatcher_t *pt_tls_dispatcher_create(host_t *address,
                        .dispatch = _dispatch,
                        .destroy = _destroy,
                },
                        .dispatch = _dispatch,
                        .destroy = _destroy,
                },
-               .server = id,
+               .server = id->clone(id),
                /* we currently don't authenticate the peer, use %any identity */
                .peer = identification_create_from_encoding(ID_ANY, chunk_empty),
                .fd = -1,
                /* we currently don't authenticate the peer, use %any identity */
                .peer = identification_create_from_encoding(ID_ANY, chunk_empty),
                .fd = -1,
@@ -194,11 +194,9 @@ pt_tls_dispatcher_t *pt_tls_dispatcher_create(host_t *address,
 
        if (!open_socket(this, address))
        {
 
        if (!open_socket(this, address))
        {
-               address->destroy(address);
                destroy(this);
                return NULL;
        }
                destroy(this);
                return NULL;
        }
-       address->destroy(address);
 
        return &this->public;
 }
 
        return &this->public;
 }