From: nekral-guest Date: Wed, 22 Apr 2009 20:59:23 +0000 (+0000) Subject: * libmisc/utmp.c: Use xmalloc() rather than malloc(). X-Git-Tag: 4.1.4~128 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31906409c8a890f01f86c7b383b53a7070d0a385;p=shadow * libmisc/utmp.c: Use xmalloc() rather than malloc(). --- 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)); }