lidtsvc: coverity fixes

This commit is contained in:
Peter Howkins
2018-04-12 01:38:02 +01:00
parent 91bb9a037a
commit 691dffb076
17 changed files with 52 additions and 20 deletions

View File

@@ -441,9 +441,11 @@ int exec_proc_local_channel_object(SPC_Channel_Ptr channel)
}
}
if(mempf0(channel, pre_fork)==SPC_ERROR)
return(SPC_ERROR);
if(mempf0(channel, pre_fork)==SPC_ERROR) {
XeFree(dir);
return(SPC_ERROR);
}
/* When using HP NLIO (xj0input) we have a problem. Namely, */
/* the xj0 processs uses signal() to deal with SIGCLD which */
/* is incompatible with sigaction/sigprogmask/etc. Even */
@@ -458,9 +460,11 @@ int exec_proc_local_channel_object(SPC_Channel_Ptr channel)
sigemptyset(&oldsigmask);
sigaddset(&newsigmask, SIGCHLD);
if (sigprocmask(SIG_BLOCK, &newsigmask, &oldsigmask) == ERROR)
return(SPC_ERROR);
if (sigprocmask(SIG_BLOCK, &newsigmask, &oldsigmask) == ERROR) {
XeFree(dir);
return(SPC_ERROR);
}
pid = channel->pid = fork();
/*