Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
dd99a450
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
dd99a450
编写于
2月 23, 2023
作者:
H
Haojun Liao
提交者:
GitHub
2月 23, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #20093 from taosdata/fix/freeNullBatch
fix: fix invalid free
上级
5b1c2fc3
e8b6d8fa
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
12 deletion
+7
-12
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
+0
-1
source/libs/transport/src/trans.c
source/libs/transport/src/trans.c
+5
-8
source/libs/transport/src/transCli.c
source/libs/transport/src/transCli.c
+1
-0
source/libs/transport/src/transComm.c
source/libs/transport/src/transComm.c
+1
-3
未找到文件。
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
浏览文件 @
dd99a450
...
@@ -160,7 +160,6 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
...
@@ -160,7 +160,6 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
dGError
(
"vgId:%d, msg:%p failed to put into vnode queue since %s, type:%s qtype:%d contLen:%d"
,
pHead
->
vgId
,
pMsg
,
dGError
(
"vgId:%d, msg:%p failed to put into vnode queue since %s, type:%s qtype:%d contLen:%d"
,
pHead
->
vgId
,
pMsg
,
terrstr
(),
TMSG_INFO
(
pMsg
->
msgType
),
qtype
,
pHead
->
contLen
);
terrstr
(),
TMSG_INFO
(
pMsg
->
msgType
),
qtype
,
pHead
->
contLen
);
terrno
=
(
terrno
!=
0
)
?
terrno
:
-
1
;
terrno
=
(
terrno
!=
0
)
?
terrno
:
-
1
;
vmSendResponse
(
pMsg
);
return
terrno
;
return
terrno
;
}
}
...
...
source/libs/transport/src/trans.c
浏览文件 @
dd99a450
...
@@ -13,8 +13,6 @@
...
@@ -13,8 +13,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#ifdef USE_UV
#include "transComm.h"
#include "transComm.h"
void
*
(
*
taosInitHandle
[])(
uint32_t
ip
,
uint32_t
port
,
char
*
label
,
int32_t
numOfThreads
,
void
*
fp
,
void
*
shandle
)
=
{
void
*
(
*
taosInitHandle
[])(
uint32_t
ip
,
uint32_t
port
,
char
*
label
,
int32_t
numOfThreads
,
void
*
fp
,
void
*
shandle
)
=
{
...
@@ -88,6 +86,11 @@ void* rpcOpen(const SRpcInit* pInit) {
...
@@ -88,6 +86,11 @@ void* rpcOpen(const SRpcInit* pInit) {
pRpc
->
connType
=
pInit
->
connType
;
pRpc
->
connType
=
pInit
->
connType
;
pRpc
->
idleTime
=
pInit
->
idleTime
;
pRpc
->
idleTime
=
pInit
->
idleTime
;
pRpc
->
parent
=
pInit
->
parent
;
if
(
pInit
->
user
)
{
tstrncpy
(
pRpc
->
user
,
pInit
->
user
,
sizeof
(
pRpc
->
user
));
}
pRpc
->
tcphandle
=
pRpc
->
tcphandle
=
(
*
taosInitHandle
[
pRpc
->
connType
])(
ip
,
pInit
->
localPort
,
pRpc
->
label
,
pRpc
->
numOfThreads
,
NULL
,
pRpc
);
(
*
taosInitHandle
[
pRpc
->
connType
])(
ip
,
pInit
->
localPort
,
pRpc
->
label
,
pRpc
->
numOfThreads
,
NULL
,
pRpc
);
...
@@ -95,10 +98,6 @@ void* rpcOpen(const SRpcInit* pInit) {
...
@@ -95,10 +98,6 @@ void* rpcOpen(const SRpcInit* pInit) {
taosMemoryFree
(
pRpc
);
taosMemoryFree
(
pRpc
);
return
NULL
;
return
NULL
;
}
}
pRpc
->
parent
=
pInit
->
parent
;
if
(
pInit
->
user
)
{
tstrncpy
(
pRpc
->
user
,
pInit
->
user
,
sizeof
(
pRpc
->
user
));
}
int64_t
refId
=
transAddExHandle
(
transGetInstMgt
(),
pRpc
);
int64_t
refId
=
transAddExHandle
(
transGetInstMgt
(),
pRpc
);
transAcquireExHandle
(
transGetInstMgt
(),
refId
);
transAcquireExHandle
(
transGetInstMgt
(),
refId
);
...
@@ -188,5 +187,3 @@ void rpcCleanup(void) {
...
@@ -188,5 +187,3 @@ void rpcCleanup(void) {
return
;
return
;
}
}
#endif
source/libs/transport/src/transCli.c
浏览文件 @
dd99a450
...
@@ -985,6 +985,7 @@ _RETURN:
...
@@ -985,6 +985,7 @@ _RETURN:
}
}
static
void
cliDestroyBatch
(
SCliBatch
*
pBatch
)
{
static
void
cliDestroyBatch
(
SCliBatch
*
pBatch
)
{
if
(
pBatch
==
NULL
)
return
;
while
(
!
QUEUE_IS_EMPTY
(
&
pBatch
->
wq
))
{
while
(
!
QUEUE_IS_EMPTY
(
&
pBatch
->
wq
))
{
queue
*
h
=
QUEUE_HEAD
(
&
pBatch
->
wq
);
queue
*
h
=
QUEUE_HEAD
(
&
pBatch
->
wq
);
QUEUE_REMOVE
(
h
);
QUEUE_REMOVE
(
h
);
...
...
source/libs/transport/src/transComm.c
浏览文件 @
dd99a450
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
* You should have received a copy of the GNU Affero General Public License
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#ifdef USE_UV
#include "transComm.h"
#include "transComm.h"
...
@@ -67,7 +66,7 @@ int32_t transDecompressMsg(char** msg, int32_t len) {
...
@@ -67,7 +66,7 @@ int32_t transDecompressMsg(char** msg, int32_t len) {
char
*
buf
=
taosMemoryCalloc
(
1
,
oriLen
+
sizeof
(
STransMsgHead
));
char
*
buf
=
taosMemoryCalloc
(
1
,
oriLen
+
sizeof
(
STransMsgHead
));
STransMsgHead
*
pNewHead
=
(
STransMsgHead
*
)
buf
;
STransMsgHead
*
pNewHead
=
(
STransMsgHead
*
)
buf
;
int32_t
decompLen
=
LZ4_decompress_safe
(
pCont
+
sizeof
(
STransCompMsg
),
pNewHead
->
content
,
int32_t
decompLen
=
LZ4_decompress_safe
(
pCont
+
sizeof
(
STransCompMsg
),
(
char
*
)
pNewHead
->
content
,
len
-
sizeof
(
STransMsgHead
)
-
sizeof
(
STransCompMsg
),
oriLen
);
len
-
sizeof
(
STransMsgHead
)
-
sizeof
(
STransCompMsg
),
oriLen
);
memcpy
((
char
*
)
pNewHead
,
(
char
*
)
pHead
,
sizeof
(
STransMsgHead
));
memcpy
((
char
*
)
pNewHead
,
(
char
*
)
pHead
,
sizeof
(
STransMsgHead
));
...
@@ -655,4 +654,3 @@ void transDestoryExHandle(void* handle) {
...
@@ -655,4 +654,3 @@ void transDestoryExHandle(void* handle) {
}
}
taosMemoryFree
(
handle
);
taosMemoryFree
(
handle
);
}
}
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录