Date: Mon, 11 Jul 2022 07:59:59 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 265148] smbfs: fix potential memory leak in smbfs_node_alloc() Message-ID: <bug-265148-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265148 Bug ID: 265148 Summary: smbfs: fix potential memory leak in smbfs_node_alloc() Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: niejianglei2021@163.com smbfs_node_alloc() allocates memory chunk for np->n_name with smbfs_name_alloc() and np->n_rpath, np with malloc(). When insmntque() fails, only np is released while np->n_rpath and np->n_name is leaked. The same leak occurs when vfs_hash_insert() fails. We should release the relevant memory chunk with proper function when error occurs to avoid the memory leak. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-265148-227>