Using version 2.1.2.4 under windows:
The method TCPStream::endStream()
calls delete[] gbuf;
delete[] pbuf;
without checking if they are already set to NULL.
If for any reason endStream() is called twice, this will
cause a severe memory error.
I recomend that a test is added:
if \(gbuf\)
delete[] gbuf;
if (pbuf)
delete[] pbuf;
to avoid this.
I got this problem due to the fact that:
close() and connect() both calls this method.
So if connect() fails:
if\(\!connected\) \{ rtn = errno; endStream\(\); errno = rtn; connectError\(\); return; \}
And later on the destructor calls endStream() -> crash!
Logged In: YES
user_id=217
This should be fixed from last release (1.2.5). It was also true of
endSerial...