services: Fixed memory leak.

This commit is contained in:
Jacek Caban 2012-10-09 13:39:29 +02:00 committed by Alexandre Julliard
parent e920be279f
commit cea783ddda
1 changed files with 3 additions and 1 deletions

View File

@ -456,8 +456,10 @@ DWORD __cdecl svcctl_CreateServiceW(
return err;
err = parse_dependencies((LPCWSTR)lpDependencies, entry);
if (err != ERROR_SUCCESS)
if (err != ERROR_SUCCESS) {
free_service_entry(entry);
return err;
}
entry->ref_count = 1;
entry->config.dwServiceType = entry->status.dwServiceType = dwServiceType;