mirror of
https://github.com/apache/nuttx.git
synced 2026-09-12 05:30:20 +00:00
fs/files_allocate: assert when fd overflow
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
ad9ba8f454
commit
66d854371b
1 changed files with 6 additions and 0 deletions
|
|
@ -98,6 +98,12 @@ static int files_extend(FAR struct filelist *list, size_t row)
|
|||
|
||||
list->fl_files = tmp;
|
||||
list->fl_rows = row;
|
||||
|
||||
/* Note: If assertion occurs, the fl_rows has a overflow.
|
||||
* And there may be file descriptors leak in system.
|
||||
*/
|
||||
|
||||
DEBUGASSERT(list->fl_rows == row);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue