Skip to content

Commit

Permalink
fixup: reworked
Browse files Browse the repository at this point in the history
  • Loading branch information
shaitan committed May 20, 2019
1 parent 6d68d4a commit c9ebad3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions library/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1211,16 +1211,18 @@ struct dnet_net_state *dnet_state_create(struct dnet_node *n,
err_out_send_destroy:
pthread_mutex_lock(&n->state_lock);
err_out_unlock:
dnet_state_rb_remove_nolock(st);
list_del_init(&st->storage_state_entry);
dnet_state_remove_nolock(st);
pthread_mutex_unlock(&n->state_lock);

dnet_state_put(st);
pthread_mutex_destroy(&st->send_lock);
pthread_mutex_destroy(&st->trans_lock);
dnet_state_put(st);

goto err_out_exit;

err_out_dup_destroy:
dnet_sock_close(n, st->write_s);
err_out_free:
dnet_state_destroy(st);
free(st);
err_out_close:
dnet_sock_close(n, s);

Expand Down

0 comments on commit c9ebad3

Please sign in to comment.