commit | 7082cbf0ae51eb1044fe1a0749245e97e4fcfc89 | [log] [tgz] |
---|---|---|
author | Benjamin Gordon <[email protected]> | Tue Aug 02 15:33:44 2022 |
committer | Chromeos LUCI <[email protected]> | Thu Aug 04 00:54:06 2022 |
tree | ee2f5c32bfa246ab0fb01de8d8b29b1a65f227c1 | |
parent | b2f37be7c25bc83b76f1b7063a4ef38b824dc4ef [diff] |
rootdev: Fix memory leak match_sysfs_device allocates a struct dirent that was used with readdir_r. When the function was converted to use readdir, the malloc wasn't removed, so this is now a memory leak. Remove the malloc entirely, since readdir returns a pointer to its own memory. BUG=b:225008839 TEST=FEATURES=test emerge-octopus rootdev Change-Id: I20325e8b4baebca7ea358ccd804f761aeda2bfa1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/rootdev/+/3804964 Tested-by: Benjamin Gordon <[email protected]> Reviewed-by: Jordan Abrahams-Whitehead <[email protected]> Commit-Queue: Benjamin Gordon <[email protected]>