mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-21 20:19:33 +00:00
The function uio_line_from_file() fails to close the FILE pointer when fgets() returns NULL, causing a file descriptor leak. This can be triggered when reading from /sys files that return empty content, leading to resource exhaustion over time. Fix this by using goto-based error handling to ensure fclose() is called on all exit paths. Signed-off-by: Qliangw <qili00001@gmail.com> (cherry picked from commitcd75edf25d) Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com> (cherry picked from commitd97b5602d7) Signed-off-by: Anuj Mittal <anuj.mittal@oss.qualcomm.com>