Permalink
Browse files

LCDServer: fix coverity ID 746888 Uninitialized pointer field

In LCDServer::LCDServer(): There is a code path where m_lastSocket is not
initialized in the constructor.
  • Loading branch information...
Paul Harrison
Paul Harrison committed Jun 12, 2013
1 parent 7e7ccf2 commit 20c29158a1799f78f1ed07541759d49af1a6fca1
Showing with 4 additions and 4 deletions.
  1. +4 −4 mythtv/programs/mythlcdserver/lcdserver.cpp
@@ -76,16 +76,17 @@ int debug_level = 0;
#define LOC_ERR QString("LCDServer, Error: ")
LCDServer::LCDServer(int port, QString message, int messageTime)
:QObject()
:QObject(),
m_lcd(new LCDProcClient(this)),
m_serverPool(new ServerPool()),
m_lastSocket(NULL)
{
m_lcd = new LCDProcClient(this);
if (!m_lcd->SetupLCD())
{
delete m_lcd;
m_lcd = NULL;
}
m_serverPool = new ServerPool();
connect(m_serverPool, SIGNAL(newConnection(QTcpSocket*)),
this, SLOT(newConnection(QTcpSocket*)));
@@ -97,7 +98,6 @@ LCDServer::LCDServer(int port, QString message, int messageTime)
delete m_serverPool;
return;
}
m_lastSocket = NULL;
if (m_lcd)
m_lcd->setStartupMessage(message, messageTime);

0 comments on commit 20c2915

Please sign in to comment.