diff options
author | Holger Hoffstätte <holger@applied-asynchrony.com> | 2018-06-28 23:08:57 +0200 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2018-06-29 08:49:13 -0500 |
commit | 79648ac1c6355975abca6acf6076e7022037523f (patch) | |
tree | 7684a26ac483c2432d4d1416f15e2344159e23b2 | |
parent | 02af762e83640ec23bf64c5b814f0d3424d90e10 (diff) |
rc-status: initialize uptime pointer to prevent memory corruption
This fixes #231.
-rw-r--r-- | src/rc/rc-status.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rc/rc-status.c b/src/rc/rc-status.c index 85e71dbb..cebdc5ed 100644 --- a/src/rc/rc-status.c +++ b/src/rc/rc-status.c @@ -87,7 +87,7 @@ static char *get_uptime(const char *service) time_t diff_hours = (time_t) 0; time_t diff_mins = (time_t) 0; time_t diff_secs = (time_t) 0; - char *uptime; + char *uptime = NULL; if (state & RC_SERVICE_STARTED) { start_count = rc_service_value_get(service, "start_count"); |