- If the server is terminated unexpectedly, sensor library releases the memory
of channel automatically. At that time, if client calls disconnect(),
double-free problem is invoked.
- Because it is right situation to call disconnect() explicitly,
the auto-release code should be removed.
Change-Id: I31894354eb2d11549dbe0382ce865de6beea89d4
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
if (condition & (EVENT_HUP)) {
m_ch->disconnect();
- delete m_ch;
m_ch = NULL;
return false;
}
if (!m_ch->read_sync(msg, false)) {
m_ch->disconnect();
- delete m_ch;
m_ch = NULL;
return false;
}