diff --git a/library/net.c b/library/net.c index ca3f54a12..108c25826 100644 --- a/library/net.c +++ b/library/net.c @@ -1217,7 +1217,7 @@ struct dnet_net_state *dnet_state_create(struct dnet_node *n, err_out_dup_destroy: dnet_sock_close(n, st->write_s); err_out_free: - free(st); + dnet_state_destroy(st); err_out_close: dnet_sock_close(n, s);