Coverity is reporting double unlock.
3159
10. Condition readable, taking true branch.
11. Condition !!(readable || writeable), taking true branch.
3160 REQUIRE(readable || writeable);
12. Condition readable, taking true branch.
3161 if (readable) {
13. Condition sock->listener, taking true branch.
3162 if (sock->listener) {
14. unlock: internal_accept unlocks sock->lock. [show details]
3163 internal_accept(sock);
15. Falling through to end of if statement.
3164 } else {
3165 internal_recv(sock);
3166 }
3167 }
3168
16. Condition writeable, taking true branch.
3169 if (writeable) {
17. Condition sock->connecting, taking false branch.
3170 if (sock->connecting) {
3171 internal_connect(sock);
3172 } else {
CID 303441 (#1-2 of 2): Double unlock (LOCK)
18. double_unlock: internal_send unlocks sock->lock while it is unlocked. [show details]
3173 internal_send(sock);
3174 }
3175 }
3176
3177 /* sock->lock is unlocked in internal_* function */