Module: wine Branch: master Commit: 5c4a3bd61b054747f50351765fa56aacf0791191 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5c4a3bd61b054747f50351765f...
Author: Marcus Meissner meissner@suse.de Date: Thu Feb 4 15:26:53 2010 +0100
msi: Handle some error returns (Coverity).
---
dlls/msi/tests/install.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 9b334ed..62d3a66 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -7475,6 +7475,7 @@ static void test_start_services(void) } scm = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); ok(scm != NULL, "Failed to open the SC Manager\n"); + if (!scm) return;
service = OpenService(scm, "Spooler", SC_MANAGER_ALL_ACCESS); if (!service && GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST) @@ -7483,7 +7484,11 @@ static void test_start_services(void) CloseServiceHandle(scm); return; } - ok(service != NULL, "Failed to open Spooler\n"); + ok(service != NULL, "Failed to open Spooler, error %d\n", GetLastError()); + if (!service) { + CloseServiceHandle(scm); + return; + }
ret = StartService(service, 0, NULL); if (!ret && (error = GetLastError()) != ERROR_SERVICE_ALREADY_RUNNING)