return;
}
}
- if (pServiceFailureActions->cActions)
- {
- if (pServiceFailureActions->lpsaActions[0].Type == SC_ACTION_REBOOT)
- {
- LoadString(hInst, IDS_SERVICES_YES, szStatus, 128);
- item.pszText = szStatus;
- item.iSubItem = 1;
- SendMessage(hServicesListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item);
- }
- }
if (pServiceFailureActions != NULL)
{
+ if (pServiceFailureActions->cActions && pServiceFailureActions->lpsaActions[0].Type == SC_ACTION_REBOOT)
+ {
+ LoadString(hInst, IDS_SERVICES_YES, szStatus, 128);
+ item.pszText = szStatus;
+ item.iSubItem = 1;
+ SendMessage(hServicesListCtrl, LVM_SETITEMTEXT, item.iItem, (LPARAM) &item);
+ }
HeapFree(GetProcessHeap(), 0, pServiceFailureActions);
pServiceFailureActions = NULL;
}
if (Data == NULL)
break;
- RegEnumKeyEx(hKey, Index, szValueName, &dwValueLength, NULL, NULL, NULL, NULL);
+ if(RegEnumKeyEx(hKey, Index, szValueName, &dwValueLength, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
+ {
+ HeapFree(GetProcessHeap(), 0, Data);
+ continue;
+ }
_stprintf(szSubPath, _T("%s\\%s"), szBasePath, szValueName);
memset(&item, 0, sizeof(LV_ITEM));
item.mask = LVIF_TEXT;