don't forget a free
use g_*
This commit is contained in:
parent
c61ea8df9e
commit
3ef2e5f7ff
@ -69,7 +69,7 @@ add_xtmp_entry(int pid, const char *line, const char *user, const char *rhostnam
|
||||
i--;
|
||||
}
|
||||
|
||||
hostname = strndup(rhostname, i);
|
||||
hostname = g_strndup(rhostname, i);
|
||||
|
||||
memset(&ut, 0, sizeof(ut));
|
||||
|
||||
@ -97,6 +97,7 @@ add_xtmp_entry(int pid, const char *line, const char *user, const char *rhostnam
|
||||
log_message(LOG_LEVEL_DEBUG, "HAVE_UTMP_H");
|
||||
updwtmp("/var/log/wtmp", &ut);
|
||||
#endif
|
||||
g_free(hostname);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user