Merge pull request #19541 from taosdata/fix/TD-21842

fix:memory leak
This commit is contained in:
dapan1121 2023-01-16 13:10:54 +08:00 committed by GitHub
commit 09c0ff4dbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1448,6 +1448,7 @@ int taos_write_raw_block_with_fields(TAOS* taos, int rows, char* pData, const ch
end: end:
taosMemoryFreeClear(pTableMeta); taosMemoryFreeClear(pTableMeta);
qDestroyQuery(pQuery); qDestroyQuery(pQuery);
destroyRequest(pRequest);
taosMemoryFree(subReq); taosMemoryFree(subReq);
return code; return code;
} }
@ -1639,6 +1640,7 @@ int taos_write_raw_block(TAOS* taos, int rows, char* pData, const char* tbname)
end: end:
taosMemoryFreeClear(pTableMeta); taosMemoryFreeClear(pTableMeta);
qDestroyQuery(pQuery); qDestroyQuery(pQuery);
destroyRequest(pRequest);
taosMemoryFree(subReq); taosMemoryFree(subReq);
return code; return code;
} }