Attempt to fix Coverity CID #87810 Dereference null return value

Fixes, or rather works around the Coverity warning of possible NULL
pointer dereference.  (Not an error.)

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-02-26 16:34:38 +01:00
parent 5d5075954e
commit 216701ce3c
+2
View File
@@ -328,6 +328,8 @@ int svc_register(int type, char *line, char *username)
/* Example: inetd ssh@eth0:222/tcp */
if (service) {
proto = strchr(service, '/');
if (!proto)
goto incomplete;
*proto++ = 0;
port = strchr(service, ':');