messenger->lock.Unlock();
rc = tcp_write(sd, (char*)&reply, sizeof(reply));
- if (rc < 0)
+ if (rc < 0) {
+ if (existing)
+ existing->pipe_lock.Unlock();
goto fail_unlocked;
+ }
if (reply.authorizer_len) {
rc = tcp_write(sd, authorizer_reply.c_str(), authorizer_reply.length());
- if (rc < 0)
+ if (rc < 0) {
+ if (existing)
+ existing->pipe_lock.Unlock();
goto fail_unlocked;
+ }
}
if (replace) {
if (reply_tag == CEPH_MSGR_TAG_SEQ) {
if(tcp_write(sd, (char*)&existing->in_seq, sizeof(existing->in_seq)) < 0) {
dout(2) << "accept write error on in_seq" << dendl;
+ existing->pipe_lock.Unlock();
goto fail_unlocked;
}
if(tcp_read(sd, (char*)&newly_acked_seq, sizeof(newly_acked_seq)) < 0) {
dout(2) << "accept read error on newly_acked_seq" << dendl;
+ existing->pipe_lock.Unlock();
goto fail_unlocked;
}
}