diff options
Diffstat (limited to 'src/uptime.c')
-rw-r--r-- | src/uptime.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/uptime.c b/src/uptime.c index 8e8f2ca6..4ab914f3 100644 --- a/src/uptime.c +++ b/src/uptime.c @@ -1,5 +1,5 @@ /* GNU's uptime. - Copyright (C) 1992-2013 Free Software Foundation, Inc. + Copyright (C) 1992-2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -176,7 +176,7 @@ static void uptime (const char *filename, int options) { size_t n_users; - STRUCT_UTMP *utmp_buf; + STRUCT_UTMP *utmp_buf = NULL; #if HAVE_UTMPX_H || HAVE_UTMP_H if (read_utmp (filename, &n_users, &utmp_buf, options) != 0) @@ -184,6 +184,8 @@ uptime (const char *filename, int options) #endif print_uptime (n_users, utmp_buf); + + IF_LINT (free (utmp_buf)); } void |