sys/vfs/hammer2: Fix memory leak for second PFS mount and after
commit2a6d3b8baa37a2e7d6a1e3f5dd211b2b8bc53661
authorTomohiro Kusumi <tkusumi@netbsd.org>
Sat, 29 Apr 2023 05:30:09 +0000 (28 22:30 -0700)
committerTomohiro Kusumi <tkusumi@netbsd.org>
Sat, 29 Apr 2023 06:33:43 +0000 (28 23:33 -0700)
tree67c1280702cec33054e2f29ef6cb886f51b4725e
parentaea8f7767fd608c1754389b6ebd4732e0b77015a
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).
sys/vfs/hammer2/hammer2_vfsops.c