Skip to content
Snippets Groups Projects
Commit e30bed5c authored by Raphael S. Carvalho's avatar Raphael S. Carvalho Committed by Pekka Enberg
Browse files

vfs: Fix dentry leak in sys_pivot_root


newmp->m_covered must be released if not NULL.
Found this problem while dumping dcache content.

Signed-off-by: default avatarRaphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent af466dbc
No related branches found
No related tags found
No related merge requests found
......@@ -313,6 +313,9 @@ sys_pivot_root(const char *new_root, const char *put_old)
newmp->m_root->d_vnode->v_mount = newmp;
if (newmp->m_covered) {
drele(newmp->m_covered);
}
newmp->m_covered = NULL;
free(oldmp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment