Skip to content

Commit 41138bc

Browse files
Roytakmichalvasko
authored andcommitted
session BUGFIX unlock chlock in session free
1 parent bf25db3 commit 41138bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ nc_session_free(struct nc_session *session, void (*data_free)(void *))
939939

940940
if ((session->side == NC_SERVER) && (session->flags & NC_SESSION_CALLHOME)) {
941941
/* CH UNLOCK */
942-
if (!r) {
942+
if (r == 1) {
943943
/* only if we locked it */
944944
nc_mutex_unlock(&session->opts.server.ch_lock, __func__);
945945
}

0 commit comments

Comments
 (0)