* libmisc/utmp.c: Use xmalloc() rather than malloc().

This commit is contained in:
nekral-guest 2009-04-22 20:59:23 +00:00
parent b05783da32
commit 31906409c8
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/utmp.c: Use xmalloc() rather than malloc().
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/utmp.c: The name returned by ttyame() needs to be copied

View File

@ -123,7 +123,7 @@ struct utmp *get_current_utmp (void)
}
if (NULL != ut) {
ret = malloc (sizeof (*ret));
ret = (struct utmp *) xmalloc (sizeof (*ret));
memcpy (ret, ut, sizeof (*ret));
}