Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a16b010e
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a16b010e
编写于
10月 26, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: memory leak
上级
8d8fd2b2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
12 deletion
+20
-12
source/common/src/tmsg.c
source/common/src/tmsg.c
+9
-2
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+3
-10
source/libs/wal/src/walRef.c
source/libs/wal/src/walRef.c
+4
-0
source/libs/wal/src/walSeek.c
source/libs/wal/src/walSeek.c
+4
-0
未找到文件。
source/common/src/tmsg.c
浏览文件 @
a16b010e
...
@@ -5988,7 +5988,11 @@ int32_t tDecodeSMqDataRsp(SDecoder *pDecoder, SMqDataRsp *pRsp) {
...
@@ -5988,7 +5988,11 @@ int32_t tDecodeSMqDataRsp(SDecoder *pDecoder, SMqDataRsp *pRsp) {
if
(
pRsp
->
withSchema
)
{
if
(
pRsp
->
withSchema
)
{
SSchemaWrapper
*
pSW
=
(
SSchemaWrapper
*
)
taosMemoryCalloc
(
1
,
sizeof
(
SSchemaWrapper
));
SSchemaWrapper
*
pSW
=
(
SSchemaWrapper
*
)
taosMemoryCalloc
(
1
,
sizeof
(
SSchemaWrapper
));
if
(
pSW
==
NULL
)
return
-
1
;
if
(
pSW
==
NULL
)
return
-
1
;
if
(
tDecodeSSchemaWrapper
(
pDecoder
,
pSW
)
<
0
)
return
-
1
;
if
(
tDecodeSSchemaWrapper
(
pDecoder
,
pSW
)
<
0
)
{
taosMemoryFree
(
pSW
);
return
-
1
;
}
taosArrayPush
(
pRsp
->
blockSchema
,
&
pSW
);
taosArrayPush
(
pRsp
->
blockSchema
,
&
pSW
);
}
}
...
@@ -6069,7 +6073,10 @@ int32_t tDecodeSTaosxRsp(SDecoder *pDecoder, STaosxRsp *pRsp) {
...
@@ -6069,7 +6073,10 @@ int32_t tDecodeSTaosxRsp(SDecoder *pDecoder, STaosxRsp *pRsp) {
if
(
pRsp
->
withSchema
)
{
if
(
pRsp
->
withSchema
)
{
SSchemaWrapper
*
pSW
=
(
SSchemaWrapper
*
)
taosMemoryCalloc
(
1
,
sizeof
(
SSchemaWrapper
));
SSchemaWrapper
*
pSW
=
(
SSchemaWrapper
*
)
taosMemoryCalloc
(
1
,
sizeof
(
SSchemaWrapper
));
if
(
pSW
==
NULL
)
return
-
1
;
if
(
pSW
==
NULL
)
return
-
1
;
if
(
tDecodeSSchemaWrapper
(
pDecoder
,
pSW
)
<
0
)
return
-
1
;
if
(
tDecodeSSchemaWrapper
(
pDecoder
,
pSW
)
<
0
)
{
taosMemoryFree
(
pSW
);
return
-
1
;
}
taosArrayPush
(
pRsp
->
blockSchema
,
&
pSW
);
taosArrayPush
(
pRsp
->
blockSchema
,
&
pSW
);
}
}
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
a16b010e
...
@@ -433,16 +433,9 @@ static int32_t tqInitDataRsp(SMqDataRsp* pRsp, const SMqPollReq* pReq, int8_t su
...
@@ -433,16 +433,9 @@ static int32_t tqInitDataRsp(SMqDataRsp* pRsp, const SMqPollReq* pReq, int8_t su
}
}
#endif
#endif
if
(
subType
==
TOPIC_SUB_TYPE__COLUMN
)
{
ASSERT
(
subType
==
TOPIC_SUB_TYPE__COLUMN
);
pRsp
->
withSchema
=
false
;
pRsp
->
withSchema
=
false
;
}
else
{
pRsp
->
withSchema
=
true
;
pRsp
->
blockSchema
=
taosArrayInit
(
0
,
sizeof
(
void
*
));
if
(
pRsp
->
blockSchema
==
NULL
)
{
// TODO free
return
-
1
;
}
}
return
0
;
return
0
;
}
}
...
...
source/libs/wal/src/walRef.c
浏览文件 @
a16b010e
...
@@ -32,6 +32,7 @@ SWalRef *walOpenRef(SWal *pWal) {
...
@@ -32,6 +32,7 @@ SWalRef *walOpenRef(SWal *pWal) {
return
pRef
;
return
pRef
;
}
}
#if 0
void walCloseRef(SWal *pWal, int64_t refId) {
void walCloseRef(SWal *pWal, int64_t refId) {
SWalRef **ppRef = taosHashGet(pWal->pRefHash, &refId, sizeof(int64_t));
SWalRef **ppRef = taosHashGet(pWal->pRefHash, &refId, sizeof(int64_t));
if (ppRef == NULL) return;
if (ppRef == NULL) return;
...
@@ -39,6 +40,7 @@ void walCloseRef(SWal *pWal, int64_t refId) {
...
@@ -39,6 +40,7 @@ void walCloseRef(SWal *pWal, int64_t refId) {
taosHashRemove(pWal->pRefHash, &refId, sizeof(int64_t));
taosHashRemove(pWal->pRefHash, &refId, sizeof(int64_t));
taosMemoryFree(pRef);
taosMemoryFree(pRef);
}
}
#endif
int32_t
walRefVer
(
SWalRef
*
pRef
,
int64_t
ver
)
{
int32_t
walRefVer
(
SWalRef
*
pRef
,
int64_t
ver
)
{
SWal
*
pWal
=
pRef
->
pWal
;
SWal
*
pWal
=
pRef
->
pWal
;
...
@@ -65,10 +67,12 @@ int32_t walRefVer(SWalRef *pRef, int64_t ver) {
...
@@ -65,10 +67,12 @@ int32_t walRefVer(SWalRef *pRef, int64_t ver) {
return
0
;
return
0
;
}
}
#if 0
void walUnrefVer(SWalRef *pRef) {
void walUnrefVer(SWalRef *pRef) {
pRef->refId = -1;
pRef->refId = -1;
pRef->refFile = -1;
pRef->refFile = -1;
}
}
#endif
SWalRef
*
walRefCommittedVer
(
SWal
*
pWal
)
{
SWalRef
*
walRefCommittedVer
(
SWal
*
pWal
)
{
SWalRef
*
pRef
=
walOpenRef
(
pWal
);
SWalRef
*
pRef
=
walOpenRef
(
pWal
);
...
...
source/libs/wal/src/walSeek.c
浏览文件 @
a16b010e
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include "tref.h"
#include "tref.h"
#include "walInt.h"
#include "walInt.h"
#if 0
static int64_t walSeekWritePos(SWal* pWal, int64_t ver) {
static int64_t walSeekWritePos(SWal* pWal, int64_t ver) {
int64_t code = 0;
int64_t code = 0;
...
@@ -47,6 +48,7 @@ static int64_t walSeekWritePos(SWal* pWal, int64_t ver) {
...
@@ -47,6 +48,7 @@ static int64_t walSeekWritePos(SWal* pWal, int64_t ver) {
}
}
return 0;
return 0;
}
}
#endif
int
walInitWriteFile
(
SWal
*
pWal
)
{
int
walInitWriteFile
(
SWal
*
pWal
)
{
TdFilePtr
pIdxTFile
,
pLogTFile
;
TdFilePtr
pIdxTFile
,
pLogTFile
;
...
@@ -134,6 +136,7 @@ int64_t walChangeWrite(SWal* pWal, int64_t ver) {
...
@@ -134,6 +136,7 @@ int64_t walChangeWrite(SWal* pWal, int64_t ver) {
return
fileFirstVer
;
return
fileFirstVer
;
}
}
#if 0
int walSeekWriteVer(SWal* pWal, int64_t ver) {
int walSeekWriteVer(SWal* pWal, int64_t ver) {
int64_t code;
int64_t code;
if (ver == pWal->vers.lastVer) {
if (ver == pWal->vers.lastVer) {
...
@@ -158,3 +161,4 @@ int walSeekWriteVer(SWal* pWal, int64_t ver) {
...
@@ -158,3 +161,4 @@ int walSeekWriteVer(SWal* pWal, int64_t ver) {
return 0;
return 0;
}
}
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录