Fixed memory leak
This commit is contained in:
parent
588494a730
commit
5db30cff74
|
@ -917,6 +917,9 @@ bool MainWindow::isServiceRunning(QString name)
|
||||||
array[length] = '\0';
|
array[length] = '\0';
|
||||||
|
|
||||||
hService = OpenService(hSCManager, array, SERVICE_QUERY_STATUS);
|
hService = OpenService(hSCManager, array, SERVICE_QUERY_STATUS);
|
||||||
|
|
||||||
|
delete[] array;
|
||||||
|
|
||||||
if (hService == NULL) {
|
if (hService == NULL) {
|
||||||
appendLogNote("failed to open " + name + "service, error: " +
|
appendLogNote("failed to open " + name + "service, error: " +
|
||||||
GetLastError());
|
GetLastError());
|
||||||
|
|
Loading…
Reference in New Issue