mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity: 50976: check fsync return for cert write
This commit is contained in:
parent
e2dcbdc81a
commit
c21467a8f0
1 changed files with 2 additions and 1 deletions
|
@ -101,7 +101,8 @@ lws_plat_write_cert(struct lws_vhost *vhost, int is_key, int fd, void *buf,
|
|||
|
||||
n = write(fd, buf, len);
|
||||
|
||||
fsync(fd);
|
||||
if (fsync(fd))
|
||||
return 1;
|
||||
if (lseek(fd, 0, SEEK_SET) < 0)
|
||||
return 1;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue