commit | cecc00547a0490d8097e2b0c374b269bb8cb14da | [log] [tgz] |
---|---|---|
author | Andrey Ulanov <[email protected]> | Thu Aug 04 19:05:52 2016 |
committer | ChromeOS Commit Bot <[email protected]> | Fri Aug 05 17:42:14 2016 |
tree | ee684f8132686c93fddff996bf7d0578616ef9dc | |
parent | 4e62b0fbc077665204a0e15448c4418fc68d184e [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 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: Id18c31a069c3af7f4de5e6792ce56ce5da12016f Reviewed-on: https://chromium-review.googlesource.com/366753 Commit-Queue: Andrey Ulanov <[email protected]>