diff --git a/ChangeLog b/ChangeLog index 0a6d4f1e..853dc86d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-04-22 Nicolas François + + * libmisc/utmp.c: Use xmalloc() rather than malloc(). + 2009-04-22 Nicolas François * libmisc/utmp.c: The name returned by ttyame() needs to be copied diff --git a/libmisc/utmp.c b/libmisc/utmp.c index edd381c2..75a552fa 100644 --- a/libmisc/utmp.c +++ b/libmisc/utmp.c @@ -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)); }