From c99f594008ef8cf9b55df2f8c8d69df6e8c90507 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Mon, 26 Sep 2005 18:27:48 +0000 Subject: [PATCH] fix sigar_who_net_sessions --- src/sigar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sigar.c b/src/sigar.c index a578d54c..c7ba1cd4 100644 --- a/src/sigar.c +++ b/src/sigar.c @@ -875,7 +875,7 @@ static int sigar_who_net_sessions(sigar_t *sigar, SIGAR_WHO_LIST_GROW(wholist); who = &wholist->data[wholist->number++]; - who->time = (time() - ptr->sesi10_time); + who->time = (time(NULL) - ptr->sesi10_time); SIGAR_W2A((LPCWSTR)ptr->sesi10_username, who->user, sizeof(who->user)); SIGAR_W2A((LPCWSTR)ptr->sesi10_cname, @@ -892,6 +892,7 @@ static int sigar_who_net_sessions(sigar_t *sigar, if (buffer) { NetApiBufferFree(buffer); + buffer = NULL; } } while (status == ERROR_MORE_DATA);