CHROMIUM: fix a ChromiumOS-specific memory leak in fs/namei.c
CL:334279 added a pair of functions in fs/namei.c:
nameidata_set_temporary() and nameidata_restore_temporary().
The first of these two functions allocates a new "struct nameidata" and
also a "struct filename" which gets assigned in nameidata->name.
nameidata_restore_temporary() frees nameidata, but forgets to free
the "->name" reference, which leads to the leak of that "struct
This change makes nameidata_restore_temporary() dereference
nameidata->name before freeing the temporary nameidata.
TEST=no kmalloc-4096 leaks when running docker
Commit-Ready: Andrey Ulanov <email@example.com>
Tested-by: Andrey Ulanov <firstname.lastname@example.org>
Reviewed-by: Guenter Roeck <email@example.com>
Commit-Queue: Andrey Ulanov <firstname.lastname@example.org>
1 file changed