commit | 0cda144bc0a167ff1965dd2c98a26495a0c20f1b | [log] [tgz] |
---|---|---|
author | Andrey Ulanov <[email protected]> | Thu Aug 04 19:05:52 2016 |
committer | ChromeOS Commit Bot <[email protected]> | Tue Aug 23 19:15:08 2016 |
tree | 0281cee432095530df40e9dac6481d0c72d735dc | |
parent | cbe8f4d3550b5313599387b0a25f91325a7141ac [diff] |
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 filename". This change makes nameidata_restore_temporary() dereference nameidata->name before freeing the temporary nameidata. BUG=b:30589775, chromium:635708 TEST=no kmalloc-4096 leaks when running docker Reviewed-on: https://chromium-review.googlesource.com/366039 Commit-Ready: Andrey Ulanov <[email protected]> Tested-by: Andrey Ulanov <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Change-Id: I84522432d79e57d48696d8b62c582162e1643918 Reviewed-on: https://chromium-review.googlesource.com/374458 Commit-Queue: Andrey Ulanov <[email protected]>