git: wg: Track noise_{local, remote, keypair} allocations to detect leaks

Aaron LI aly at crater.dragonflybsd.org
Thu Feb 15 00:28:05 PST 2024


commit 41fc5cd7cb344bd75d6e057cabea692f7f95102c
Author: Aaron LI <aly at aaronly.me>
Date:   Thu Feb 8 11:19:03 2024 +0800

    wg: Track noise_{local,remote,keypair} allocations to detect leaks
    
    Use lists to track the allocations of noise_{local,remote,keypair}
    structs, and then assert that all of them have been freed upon the
    module deinitialization.
    
    Enclose the code within 'INVARIANTS' macro, so that it can be just
    ignored when performance is important.

Summary of changes:
 sys/net/wg/if_wg.c    |  4 +++
 sys/net/wg/wg_noise.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++--
 sys/net/wg/wg_noise.h |  3 ++
 3 files changed, 99 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/41fc5cd7cb344bd75d6e057cabea692f7f95102c


-- 
DragonFly BSD source repository


More information about the Commits mailing list