From 12241e0ff5ea242891fc3a8c177e8f55e897f2a3 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Sat, 16 Feb 2002 17:35:42 +0000 Subject: - Applied patches from Luke Diamand, Marc Spoorendonk and Chris Halls --- ncpd/ncp.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ncpd/ncp.cc') diff --git a/ncpd/ncp.cc b/ncpd/ncp.cc index cead4a7..031487f 100644 --- a/ncpd/ncp.cc +++ b/ncpd/ncp.cc @@ -39,7 +39,7 @@ #define MAX_CHANNELS_SIBO 8 #define NCP_SENDLEN 250 -ncp::ncp(const char *fname, int baud, IOWatch & iow) +ncp::ncp(const char *fname, int baud, IOWatch *iow) { channelPtr = new channel*[MAX_CHANNELS_PSION + 1]; messageList = new bufferStore[MAX_CHANNELS_PSION + 1]; @@ -71,8 +71,9 @@ ncp::~ncp() } controlChannel(0, NCON_MSG_NCP_END, b); delete l; - delete channelPtr; - delete remoteChanList; + delete [] channelPtr; + delete [] remoteChanList; + delete [] messageList; } int ncp:: @@ -251,7 +252,8 @@ decodeControlMessage(bufferStore & buff) } else { if (verbose & NCP_DEBUG_LOG) cout << "Unknown " << (int) buff.getByte(1) << endl; - channelPtr[forChan]->ncpConnectNak(); + if (channelPtr[forChan]) + channelPtr[forChan]->ncpConnectNak(); } break; -- cgit v1.2.3