mirror of
https://github.com/ntop/n2n.git
synced 2024-09-20 00:51:10 +02:00
fix potential memory leak (#682)
authored-by: randomize00 <randomize00@users.noreply.github.com>
This commit is contained in:
parent
d2ddc479c7
commit
e2c687558f
|
@ -688,6 +688,7 @@ static void peer_set_p2p_confirmed (n2n_edge_t * eee,
|
||||||
scan_tmp = find_peer_by_sock(peer, eee->known_peers);
|
scan_tmp = find_peer_by_sock(peer, eee->known_peers);
|
||||||
if(scan_tmp != NULL) {
|
if(scan_tmp != NULL) {
|
||||||
HASH_DEL(eee->known_peers, scan_tmp);
|
HASH_DEL(eee->known_peers, scan_tmp);
|
||||||
|
free(scan);
|
||||||
scan = scan_tmp;
|
scan = scan_tmp;
|
||||||
memcpy(scan->mac_addr, mac, sizeof(n2n_mac_t));
|
memcpy(scan->mac_addr, mac, sizeof(n2n_mac_t));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user