From 31906409c8a890f01f86c7b383b53a7070d0a385 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Wed, 22 Apr 2009 20:59:23 +0000 Subject: [PATCH] * libmisc/utmp.c: Use xmalloc() rather than malloc(). --- ChangeLog | 4 ++++ libmisc/utmp.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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)); } -- 2.40.0