summaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-27 13:47:00 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-27 13:47:00 +0300
commitfdccb337ed73f14b204721cf464ca03a7eca49b6 (patch)
tree6efd3483f969be2e63d6f285d281adbab82fff0f /src/controller.c
parent251d13cc56cdf625bafac9db008d85abe0fa893c (diff)
downloadrspamd-fdccb337ed73f14b204721cf464ca03a7eca49b6.tar.gz
rspamd-fdccb337ed73f14b204721cf464ca03a7eca49b6.zip
* Fix 2 memory leaks
* Fix uptime command output
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/controller.c b/src/controller.c
index d82cc726e..5a444b275 100644
--- a/src/controller.c
+++ b/src/controller.c
@@ -237,6 +237,7 @@ process_command (struct controller_command *cmd, char **cmd_args, struct control
else {
hours = uptime / 3600;
minutes = uptime / 60 - hours * 3600;
+ uptime -= hours * 3600 + minutes * 60;
r = snprintf (out_buf, sizeof (out_buf), "%d hour%s %d minite%s %d second%s" CRLF,
hours, hours > 1 ? "s" : " ",
minutes, minutes > 1 ? "s" : " ",