vfs: Fix refcounting of filenames in fs_parser
authorDavid Howells <dhowells@redhat.com>
Mon, 25 Mar 2019 16:38:22 +0000 (16:38 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 25 May 2019 22:00:02 +0000 (18:00 -0400)
commit7cdfa44227b0d8842d46a775cebe4311150cb8f2
treea6e3cfd0e07a2a7e355fe80a2ec0719f38b71852
parentc3aabf0780a506225b53bfe2b5177dd5dfec093d
vfs: Fix refcounting of filenames in fs_parser

Fix an overput in which filename_lookup() unconditionally drops a ref to
the filename it was given, but this isn't taken account of in the caller,
fs_lookup_param().

Addresses-Coverity-ID: 1443811 ("Use after free")
Signed-off-by: David Howells <dhowells@redhat.com>
fs/fs_parser.c