Merge pull request #2825 from AZero13/patch-2

Error check ret before calling copy_seek_stat
This commit is contained in:
Tim Kientzle 2025-12-27 10:52:17 -08:00 committed by GitHub
commit e91171c9a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -747,7 +747,8 @@ __la_seek_fstat(int fd, la_seek_stat_t *st)
int ret;
ret = __hstat((HANDLE)_get_osfhandle(fd), &u);
copy_seek_stat(st, &u);
if (ret >= 0)
copy_seek_stat(st, &u);
return (ret);
}