Skip to content

Commit a5468cd

Browse files
author
Paul Harrison
committed
MythZoneMinder: fix Coverity ID 1026737 Uninitialized pointer field
In ZMConsole::ZMConsole(): Several pointer fields are not initialized in the constructor.
1 parent aad1ec3 commit a5468cd

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

mythplugins/mythzoneminder/mythzoneminder/zmconsole.cpp

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -114,25 +114,21 @@ void FunctionDialog::setMonitorFunction(void)
114114
///////////////////////////////////////////////////////////////////////////////
115115

116116
ZMConsole::ZMConsole(MythScreenStack *parent)
117-
:MythScreenType(parent, "zmconsole")
117+
:MythScreenType(parent, "zmconsole"),
118+
m_currentMonitor(0), m_monitorListSize(0), m_monitorList(NULL),
119+
m_monitor_list(NULL), m_running_text(NULL), m_status_text(NULL),
120+
m_time_text(NULL), m_date_text(NULL), m_load_text(NULL),
121+
m_disk_text(NULL), m_functionDialog(NULL),
122+
m_popupStack(GetMythMainWindow()->GetStack("popup stack")),
123+
m_timeTimer(new QTimer(this)), m_updateTimer(new QTimer(this))
118124
{
119-
m_monitorListSize = 0;
120-
m_currentMonitor = 0;
121-
122-
m_monitorList = NULL;
123-
124125
m_timeFormat = gCoreContext->GetSetting("TimeFormat", "h:mm AP");
125126

126-
m_timeTimer = new QTimer(this);
127127
connect(m_timeTimer, SIGNAL(timeout()), this,
128128
SLOT(updateTime()));
129129

130-
m_updateTimer = new QTimer(this);
131130
connect(m_updateTimer, SIGNAL(timeout()), this,
132131
SLOT(updateStatus()));
133-
134-
m_popupStack = GetMythMainWindow()->GetStack("popup stack");
135-
m_functionDialog = NULL;
136132
}
137133

138134
ZMConsole::~ZMConsole()

0 commit comments

Comments
 (0)