Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e40b978d
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1181
Star
22014
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,发现更多精彩内容 >>
提交
e40b978d
编写于
4月 10, 2023
作者:
X
Xiaoyu Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: catalog memory leak
上级
d1decca0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
2 deletion
+18
-2
source/common/src/tmsg.c
source/common/src/tmsg.c
+2
-0
source/libs/catalog/src/ctgCache.c
source/libs/catalog/src/ctgCache.c
+12
-0
source/libs/catalog/src/ctgUtil.c
source/libs/catalog/src/ctgUtil.c
+2
-0
tests/system-test/0-others/user_control.py
tests/system-test/0-others/user_control.py
+2
-2
未找到文件。
source/common/src/tmsg.c
浏览文件 @
e40b978d
...
...
@@ -1626,6 +1626,8 @@ void tFreeSGetUserAuthRsp(SGetUserAuthRsp *pRsp) {
taosHashCleanup
(
pRsp
->
createdDbs
);
taosHashCleanup
(
pRsp
->
readDbs
);
taosHashCleanup
(
pRsp
->
writeDbs
);
taosHashCleanup
(
pRsp
->
writeTbs
);
taosHashCleanup
(
pRsp
->
readTbs
);
}
int32_t
tSerializeSCreateDropMQSNodeReq
(
void
*
buf
,
int32_t
bufLen
,
SMCreateQnodeReq
*
pReq
)
{
...
...
source/libs/catalog/src/ctgCache.c
浏览文件 @
e40b978d
...
...
@@ -2035,6 +2035,14 @@ int32_t ctgOpUpdateUser(SCtgCacheOperation *operation) {
pUser
->
userAuth
.
writeDbs
=
msg
->
userAuth
.
writeDbs
;
msg
->
userAuth
.
writeDbs
=
NULL
;
taosHashCleanup
(
pUser
->
userAuth
.
readTbs
);
pUser
->
userAuth
.
readTbs
=
msg
->
userAuth
.
readTbs
;
msg
->
userAuth
.
readTbs
=
NULL
;
taosHashCleanup
(
pUser
->
userAuth
.
writeTbs
);
pUser
->
userAuth
.
writeTbs
=
msg
->
userAuth
.
writeTbs
;
msg
->
userAuth
.
writeTbs
=
NULL
;
CTG_UNLOCK
(
CTG_WRITE
,
&
pUser
->
lock
);
_return:
...
...
@@ -2042,6 +2050,8 @@ _return:
taosHashCleanup
(
msg
->
userAuth
.
createdDbs
);
taosHashCleanup
(
msg
->
userAuth
.
readDbs
);
taosHashCleanup
(
msg
->
userAuth
.
writeDbs
);
taosHashCleanup
(
msg
->
userAuth
.
readTbs
);
taosHashCleanup
(
msg
->
userAuth
.
writeTbs
);
taosMemoryFreeClear
(
msg
);
...
...
@@ -2234,6 +2244,8 @@ void ctgFreeCacheOperationData(SCtgCacheOperation *op) {
taosHashCleanup
(
msg
->
userAuth
.
createdDbs
);
taosHashCleanup
(
msg
->
userAuth
.
readDbs
);
taosHashCleanup
(
msg
->
userAuth
.
writeDbs
);
taosHashCleanup
(
msg
->
userAuth
.
readTbs
);
taosHashCleanup
(
msg
->
userAuth
.
writeTbs
);
taosMemoryFreeClear
(
op
->
data
);
break
;
}
...
...
source/libs/catalog/src/ctgUtil.c
浏览文件 @
e40b978d
...
...
@@ -425,6 +425,8 @@ void ctgFreeMsgCtx(SCtgMsgCtx* pCtx) {
taosHashCleanup
(
pOut
->
createdDbs
);
taosHashCleanup
(
pOut
->
readDbs
);
taosHashCleanup
(
pOut
->
writeDbs
);
taosHashCleanup
(
pOut
->
readTbs
);
taosHashCleanup
(
pOut
->
writeTbs
);
taosMemoryFreeClear
(
pCtx
->
out
);
break
;
}
...
...
tests/system-test/0-others/user_control.py
浏览文件 @
e40b978d
...
...
@@ -444,7 +444,7 @@ class TDTestCase:
self
.
__grant_user_privileges
(
privilege
=
""
,
dbname
=
"db"
,
user_name
=
self
.
__user_list
[
0
])
,
self
.
__grant_user_privileges
(
privilege
=
" "
.
join
(
self
.
__privilege
),
user_name
=
self
.
__user_list
[
0
])
,
f
"GRANT
{
self
.
__privilege
[
0
]
}
ON * TO
{
self
.
__user_list
[
0
]
}
"
,
f
"GRANT
{
self
.
__privilege
[
0
]
}
ON
{
DBNAME
}
.
{
NTBNAME
}
TO
{
self
.
__user_list
[
0
]
}
"
,
#
f"GRANT {self.__privilege[0]} ON {DBNAME}.{NTBNAME} TO {self.__user_list[0]}" ,
]
def
__revoke_err
(
self
):
...
...
@@ -456,7 +456,7 @@ class TDTestCase:
self
.
__revoke_user_privileges
(
privilege
=
""
,
dbname
=
"db"
,
user_name
=
self
.
__user_list
[
0
])
,
self
.
__revoke_user_privileges
(
privilege
=
" "
.
join
(
self
.
__privilege
),
user_name
=
self
.
__user_list
[
0
])
,
f
"REVOKE
{
self
.
__privilege
[
0
]
}
ON * FROM
{
self
.
__user_list
[
0
]
}
"
,
f
"REVOKE
{
self
.
__privilege
[
0
]
}
ON
{
DBNAME
}
.
{
NTBNAME
}
FROM
{
self
.
__user_list
[
0
]
}
"
,
#
f"REVOKE {self.__privilege[0]} ON {DBNAME}.{NTBNAME} FROM {self.__user_list[0]}" ,
]
def
test_grant_err
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录