about summary refs log tree commit diff
path: root/inet/rcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'inet/rcmd.c')
-rw-r--r--inet/rcmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/inet/rcmd.c b/inet/rcmd.c
index a8a6bc451b..d76eff84e9 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -438,7 +438,8 @@ __ivaliduser(hostf, raddr, luser, ruser)
 			return 0;
 		}
 	}
-	free (buf);
+	if (buf != NULL)
+		free (buf);
 	return -1;
 }