Fixed memory leak.
This commit is contained in:
1
iftop.c
1
iftop.c
@@ -65,6 +65,7 @@ void history_rotate() {
|
|||||||
if(d->last_write == history_pos) {
|
if(d->last_write == history_pos) {
|
||||||
addr_pair key = *(addr_pair*)(n->key);
|
addr_pair key = *(addr_pair*)(n->key);
|
||||||
hash_delete(history, &key);
|
hash_delete(history, &key);
|
||||||
|
free(d);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
d->recv[history_pos] = 0;
|
d->recv[history_pos] = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user