aboutsummaryrefslogtreecommitdiff
path: root/src/rc/rc-status.c
diff options
context:
space:
mode:
authorHolger Hoffstätte <holger@applied-asynchrony.com>2018-06-28 23:08:57 +0200
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-06-29 08:49:13 -0500
commit79648ac1c6355975abca6acf6076e7022037523f (patch)
tree7684a26ac483c2432d4d1416f15e2344159e23b2 /src/rc/rc-status.c
parent02af762e83640ec23bf64c5b814f0d3424d90e10 (diff)
rc-status: initialize uptime pointer to prevent memory corruption
This fixes #231.
Diffstat (limited to 'src/rc/rc-status.c')
-rw-r--r--src/rc/rc-status.c2
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");