diff options
author | Fritz Elfert <felfert@to.com> | 2001-07-27 20:49:49 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2001-07-27 20:49:49 +0000 |
commit | d5c20d85d0642dcb6e5f3341cc5a7d0e8e48afbb (patch) | |
tree | f4170b23cb9f549c74874c813e862ee84811fc09 /ncpd | |
parent | 0cf4829cd0a704ff1e39834d246ee35be5ee8b13 (diff) | |
download | plptools-d5c20d85d0642dcb6e5f3341cc5a7d0e8e48afbb.tar.gz plptools-d5c20d85d0642dcb6e5f3341cc5a7d0e8e48afbb.tar.bz2 plptools-d5c20d85d0642dcb6e5f3341cc5a7d0e8e48afbb.zip |
Fixed crash when deleting socketChan.
Diffstat (limited to 'ncpd')
-rw-r--r-- | ncpd/ncp.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ncpd/ncp.cc b/ncpd/ncp.cc index 891fc9f..b72a708 100644 --- a/ncpd/ncp.cc +++ b/ncpd/ncp.cc @@ -54,7 +54,7 @@ ncp::ncp(const char *fname, int baud, IOWatch & iow) protocolVersion = PV_SERIES_5; // init channels - for (int i = 0; i < maxLinks(); i++) + for (int i = 0; i < MAX_CHANNELS_PSION; i++) channelPtr[i] = NULL; } @@ -67,13 +67,11 @@ ncp::~ncp() b2.addByte(remoteChanList[i]); controlChannel(i, NCON_MSG_CHANNEL_DISCONNECT, b2); } - delete channelPtr[i]; channelPtr[i] = NULL; } controlChannel(0, NCON_MSG_NCP_END, b); delete l; delete channelPtr; - delete messageList; delete remoteChanList; } @@ -87,7 +85,6 @@ reset() { for (int i = 0; i < maxLinks(); i++) { if (channelPtr[i]) channelPtr[i]->terminateWhenAsked(); - delete channelPtr[i]; channelPtr[i] = NULL; } failed = false; @@ -423,7 +420,6 @@ disconnect(int channel) channelPtr[channel]->terminateWhenAsked(); if (verbose & NCP_DEBUG_LOG) cout << "ncp: disconnect: channel=" << channel << endl; - delete channelPtr[channel]; channelPtr[channel] = NULL; bufferStore b; b.addByte(remoteChanList[channel]); |