[TD_543] fix coverity scan, cid:267728

This commit is contained in:
Shengliang Guan 2020-06-08 09:01:46 +00:00
parent 95986f9de2
commit 5711ef3efd
1 changed files with 4 additions and 0 deletions

View File

@ -87,6 +87,10 @@ void *taosThreadToOpenNewNote(void *param)
umask(0);
int fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU | S_IRWXG | S_IRWXO);
if (fd < 0) {
return NULL;
}
taosLockNote(fd, pNote);
lseek(fd, 0, SEEK_SET);