From a8300acbc5c14361c8c46cfbccf6987a336e1295 Mon Sep 17 00:00:00 2001 From: Nikos Ntarmos Date: Thu, 28 May 2009 16:40:59 +0300 Subject: [PATCH] free(3) previously strndup(3)'ed netstats.dev Signed-off-by: Nikos Ntarmos Signed-off-by: Brenden Matthews --- src/common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common.c b/src/common.c index 2262b98b..8430d0cf 100644 --- a/src/common.c +++ b/src/common.c @@ -210,6 +210,10 @@ struct net_stat *get_net_stat(const char *dev) void clear_net_stats(void) { + int i; + for (i = 0; i < 16; i++) + if (netstats[i].dev) + free(netstats[i].dev); memset(netstats, 0, sizeof(netstats)); }