Skip to content

Commit a093712

Browse files
romanmichalvasko
authored andcommitted
session BUGFIX shared ctx SSH sess free
1 parent e474d4d commit a093712

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
@@ -917,7 +917,7 @@ nc_session_free(struct nc_session *session, void (*data_free)(void *))
917917
#ifdef NC_ENABLED_SSH_TLS
918918
struct nc_session *siter;
919919

920-
if ((session->flags & NC_SESSION_SHAREDCTX) && session->ti.libssh.next) {
920+
if ((session->flags & NC_SESSION_SHAREDCTX) && (session->ti_type == NC_TI_SSH) && session->ti.libssh.next) {
921921
for (siter = session->ti.libssh.next; siter != session; siter = siter->ti.libssh.next) {
922922
if (siter->status != NC_STATUS_STARTING) {
923923
/* move LY ext data to this session */

0 commit comments

Comments
 (0)