From fdc043e7b1395fd9989b2a6bb366f9784b5e6f4a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 24 May 2009 23:44:23 +0200 Subject: [PATCH] add an assert to help debugging --- src/channel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/channel.c b/src/channel.c index e538e04..e94c37d 100644 --- a/src/channel.c +++ b/src/channel.c @@ -45,6 +45,7 @@ #ifdef HAVE_INTTYPES_H #include #endif +#include #include "channel.h" #include "transport.h" @@ -2435,6 +2436,8 @@ int _libssh2_channel_free(LIBSSH2_CHANNEL *channel) unsigned long data_len; int rc; + assert(session); + if (channel->free_state == libssh2_NB_state_idle) { _libssh2_debug(session, LIBSSH2_DBG_CONN, "Freeing channel %lu/%lu resources", channel->local.id,