]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix a memory leak in __getcwd() that can occur after a filesystem
authoriedowse <iedowse@FreeBSD.org>
Tue, 4 Sep 2001 19:03:47 +0000 (19:03 +0000)
committeriedowse <iedowse@FreeBSD.org>
Tue, 4 Sep 2001 19:03:47 +0000 (19:03 +0000)
commit44040d926100921b9fdd3a8427f5660ec08e0227
treeaa162ad43a2563b319e80cae4178b6085b2d910b
parent6995cd30050939abf97ac0fa7fb42a68ce4f63a1
Fix a memory leak in __getcwd() that can occur after a filesystem
has been forcibly unmounted. If the filesystem root vnode is reached
and it has no associated mountpoint (vp->v_mount == NULL), __getcwd
would return without freeing 'buf'. Add the missing free() call.

PR: kern/30306
Submitted by: Mike Potanin <potanin@mccme.ru>
MFC after: 1 week
sys/kern/vfs_cache.c