X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fnamei.c;h=7d77f24d32a98a115e320605369006eeef30ae0d;hb=e401f1761c0b01966e36e41e2c385d455a7b44ee;hp=b753192d8c3f15850abaab3cc36d52ff3cd59460;hpb=6845a44a314c0c626549de373131bf108f9cc1f1;p=karo-tx-linux.git diff --git a/fs/namei.c b/fs/namei.c index b753192d8c3f..7d77f24d32a9 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1272,8 +1272,10 @@ done: path->mnt = mnt; path->dentry = dentry; err = follow_managed(path, nd->flags); - if (unlikely(err < 0)) + if (unlikely(err < 0)) { + path_put_conditional(path, nd); return err; + } *inode = path->dentry->d_inode; return 0;