test: log: log_process: Close open fds on error paths
Reported-by: Coverity CID=279097 Signed-off-by: Umang Jain <email@uajain.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
5dfd2bfc0d
commit
5bb6607933
1 changed files with 1 additions and 0 deletions
|
@ -107,6 +107,7 @@ protected:
|
|||
memset(buf, 0, sizeof(buf));
|
||||
if (read(fd, buf, sizeof(buf)) < 0) {
|
||||
cerr << "Failed to read tmp log file" << endl;
|
||||
close(fd);
|
||||
return TestFail;
|
||||
}
|
||||
close(fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue