summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/users.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/users.c b/src/users.c
index 733024af1..e1772d914 100644
--- a/src/users.c
+++ b/src/users.c
@@ -57,7 +57,7 @@ list_entries_users (int n, const STRUCT_UTMP *this)
int n_entries;
n_entries = 0;
- u = xmalloc (n * sizeof (u[0]));
+ u = xnmalloc (n, sizeof *u);
for (i = 0; i < n; i++)
{
if (UT_USER (this) [0]