Fixed memory leak

This commit is contained in:
Xinyu Hou 2014-11-12 11:54:45 +00:00
parent 588494a730
commit 5db30cff74
1 changed files with 3 additions and 0 deletions

View File

@ -917,6 +917,9 @@ bool MainWindow::isServiceRunning(QString name)
array[length] = '\0';
hService = OpenService(hSCManager, array, SERVICE_QUERY_STATUS);
delete[] array;
if (hService == NULL) {
appendLogNote("failed to open " + name + "service, error: " +
GetLastError());