git: DragonFly_RELEASE_6_4 kern: Fix memory leak in kdmsg_iocom_uninit()
Aaron LI
aly at crater.dragonflybsd.org
Tue Sep 1 22:49:07 PDT 2026
commit b243cfc0beab210174dd322636534e26bd526ea1
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/b243cfc0beab210174dd322636534e26bd526ea1
--
DragonFly BSD source repository
More information about the Commits
mailing list