Remove useless assignments on error
Leave the output parameter untouched on error.
This commit is contained in:
parent
52cebe1597
commit
fd4ec784e0
1 changed files with 0 additions and 2 deletions
|
@ -84,7 +84,6 @@ sc_process_execute_p(const char *const argv[], HANDLE *handle,
|
||||||
|
|
||||||
char *cmd = malloc(CMD_MAX_LEN);
|
char *cmd = malloc(CMD_MAX_LEN);
|
||||||
if (!cmd || !build_cmd(cmd, CMD_MAX_LEN, argv)) {
|
if (!cmd || !build_cmd(cmd, CMD_MAX_LEN, argv)) {
|
||||||
*handle = NULL;
|
|
||||||
goto error_close_stderr;
|
goto error_close_stderr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +97,6 @@ sc_process_execute_p(const char *const argv[], HANDLE *handle,
|
||||||
if (!CreateProcessW(NULL, wide, NULL, NULL, TRUE, 0, NULL, NULL, &si,
|
if (!CreateProcessW(NULL, wide, NULL, NULL, TRUE, 0, NULL, NULL, &si,
|
||||||
&pi)) {
|
&pi)) {
|
||||||
free(wide);
|
free(wide);
|
||||||
*handle = NULL;
|
|
||||||
|
|
||||||
if (GetLastError() == ERROR_FILE_NOT_FOUND) {
|
if (GetLastError() == ERROR_FILE_NOT_FOUND) {
|
||||||
ret = SC_PROCESS_ERROR_MISSING_BINARY;
|
ret = SC_PROCESS_ERROR_MISSING_BINARY;
|
||||||
|
|
Loading…
Reference in a new issue