git: sys/vfs/hammer2: Fix memory leak for second PFS mount and after

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Fri Apr 28 23:30:05 PDT 2023


commit 2a6d3b8baa37a2e7d6a1e3f5dd211b2b8bc53661
Author: Tomohiro Kusumi <tkusumi at netbsd.org>
Date:   Fri Apr 28 22:30:09 2023 -0700

    sys/vfs/hammer2: Fix memory leak for second PFS mount and after
    
    When mounting, hmp and its ->devvpl are initialized only if it's
    the first PFS mount of that hmp. For the second PFS mount and after,
    malloc'd memory in a devvpl list (64 bytes per device per PFS)
    has been leaked.
    
    Found on FreeBSD on kldunload.
    --
    Warning: memory type hammer2_mount leaked memory on destroy (1 allocations, 64 bytes leaked).

Summary of changes:
 sys/vfs/hammer2/hammer2_vfsops.c | 2 ++
 1 file changed, 2 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2a6d3b8baa37a2e7d6a1e3f5dd211b2b8bc53661


-- 
DragonFly BSD source repository


More information about the Commits mailing list