fix(query): fix null ptr access.

This commit is contained in:
Haojun Liao 2022-12-03 17:03:31 +08:00
parent fa43f86fe1
commit a3200b555c
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ struct SDiskbasedBuf {
}; };
static int32_t createDiskFile(SDiskbasedBuf* pBuf) { static int32_t createDiskFile(SDiskbasedBuf* pBuf) {
if (pBuf->path[0] == '\0') { // prepare the file name when needed it if (pBuf->path == NULL) { // prepare the file name when needed it
char path[PATH_MAX] = {0}; char path[PATH_MAX] = {0};
taosGetTmpfilePath(pBuf->prefix, "paged-buf", path); taosGetTmpfilePath(pBuf->prefix, "paged-buf", path);
pBuf->path = taosMemoryStrDup(path); pBuf->path = taosMemoryStrDup(path);