git: kern: Fix memory leak in kdmsg_iocom_uninit()
Aaron LI
aly at crater.dragonflybsd.org
Tue Sep 1 05:45:17 PDT 2026
commit bfcedfb468d712f29cadb491bec0928ad4279bad
Author: Antonio Huete Jimenez <tuxillo at quantumachine.net>
Date: Fri Dec 19 00:56:11 2025 +0100
kern: Fix memory leak in kdmsg_iocom_uninit()
When kdmsg_iocom_uninit() is called but no connection was ever
established (no reader/writer threads), a PING message was allocated and
queued but never freed. This caused a 120-byte leak from the HAMMER2-msg
allocator on shutdown.
Fix this by calling kdmsg_drain_msgq() to clean up any queued messages.
This fixes the 'malloc_uninit: 120 bytes of HAMMER2-msg still allocated'
warning. Note that this warning already disappeared after fixing the
hammer2_ioctl_recluster() bug in commit
c5cc81fefa166cc45657541c155797f0cff88c62.
Bug: https://bugs.dragonflybsd.org/issues/3385
Summary of changes:
sys/kern/kern_dmsg.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/bfcedfb468d712f29cadb491bec0928ad4279bad
--
DragonFly BSD source repository
More information about the Commits
mailing list