fix: fix asan error of leaked memory

This commit is contained in:
shenglian zhou 2022-11-12 19:42:49 +08:00
parent c2d3d3b20d
commit 532189d662
1 changed files with 1 additions and 0 deletions

View File

@ -864,6 +864,7 @@ void udfdCtrlAllocBufCb(uv_handle_t *handle, size_t suggested_size, uv_buf_t *bu
void udfdCtrlReadCb(uv_stream_t *q, ssize_t nread, const uv_buf_t *buf) {
if (nread < 0) {
fnError("udfd ctrl pipe read error. %s", uv_err_name(nread));
taosMemoryFree(buf->base);
uv_close((uv_handle_t *)q, NULL);
uv_stop(global.loop);
return;