mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-27 04:32:55 +00:00
free(3) previously strndup(3)'ed netstats.dev
Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr> Signed-off-by: Brenden Matthews <brenden@rty.ca>
This commit is contained in:
parent
ed5dbc02bb
commit
a8300acbc5
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user