chiark / gitweb /
utmp: properly initialize local variables
authorLennart Poettering <lennart@poettering.net>
Fri, 18 Jun 2010 17:18:03 +0000 (19:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 18 Jun 2010 17:18:03 +0000 (19:18 +0200)
src/utmp-wtmp.c

index 5aafb7b..d7cda82 100644 (file)
@@ -291,7 +291,7 @@ finish:
 int utmp_wall(const char *message) {
         struct utmpx *u;
         char date[26];
-        char *text, *hn, *un, *tty;
+        char *text = NULL, *hn = NULL, *un = NULL, *tty = NULL;
         int r;
         time_t t;