diff options
Diffstat (limited to 'src/libpttls/pt_tls_dispatcher.c')
-rw-r--r-- | src/libpttls/pt_tls_dispatcher.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libpttls/pt_tls_dispatcher.c b/src/libpttls/pt_tls_dispatcher.c index 469951616..5c306371c 100644 --- a/src/libpttls/pt_tls_dispatcher.c +++ b/src/libpttls/pt_tls_dispatcher.c @@ -185,7 +185,7 @@ pt_tls_dispatcher_t *pt_tls_dispatcher_create(host_t *address, .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, @@ -194,11 +194,9 @@ pt_tls_dispatcher_t *pt_tls_dispatcher_create(host_t *address, if (!open_socket(this, address)) { - address->destroy(address); destroy(this); return NULL; } - address->destroy(address); return &this->public; } |