If LWP_CreateProcess fails in gtx_Init return NULL, rather than
silently swallowing the failure.
Caught by clang-analyzer
Change-Id: I5db5667f9dae3f405e88cf9c57e6b8a069ea28a3
Reviewed-on: http://gerrit.openafs.org/9236
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
/* if we start input thread */
IOMGR_Initialize(); /* input thread uses it */
- if (astartInput)
- code =
- LWP_CreateProcess(gtx_InputServer, 8192, LWP_NORMAL_PRIORITY,
- (void *)0, "gx-listener", &junk);
+ if (astartInput) {
+ code = LWP_CreateProcess(gtx_InputServer, 8192, LWP_NORMAL_PRIORITY,
+ NULL, "gx-listener", &junk);
+ if (code)
+ return NULL;
+ }
+
/* all done */
twin = &gator_basegwin;
return twin;