Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
if (++count == 3) {
syslog(LOG_WARNING, "invalid password for '%s'%s",
username, fromhost);
+
+ if (ENABLE_FEATURE_CLEAN_UP)
+ free(fromhost);
+
return EXIT_FAILURE;
}
username[0] = '\0';
if (pw->pw_uid == 0)
syslog(LOG_INFO, "root login%s", fromhost);
+ if (ENABLE_FEATURE_CLEAN_UP)
+ free(fromhost);
+
/* well, a simple setexeccon() here would do the job as well,
* but let's play the game for now */
IF_SELINUX(set_current_security_context(user_sid);)