Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
2b3c49b6
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2b3c49b6
编写于
12月 01, 2007
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix numerous memory leaks
上级
b4f841d9
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
28 addition
and
15 deletion
+28
-15
ChangeLog
ChangeLog
+9
-0
src/hash.c
src/hash.c
+1
-0
src/iptables.c
src/iptables.c
+1
-1
src/qemu_driver.c
src/qemu_driver.c
+3
-0
src/remote_internal.c
src/remote_internal.c
+4
-11
src/virsh.c
src/virsh.c
+10
-3
未找到文件。
ChangeLog
浏览文件 @
2b3c49b6
Sat Dec 1 10:42:34 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/hash.c: reset error object when releasing connection
* src/iptables.c: don't strdup() param passed to strcmp()
* src/qemu_driver.c: free TLS directory path in driver shutdown
* src/remote_internal.c: don't strdup() params for virRaiseError
* src/virsh.c: reset global error object at shutdown. Release
connection state during abnormal shutdown
Sat Dec 1 10:22:34 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/qemu_driver.c: Fix off-by-1 buffer NULL termination in
...
...
src/hash.c
浏览文件 @
2b3c49b6
...
...
@@ -726,6 +726,7 @@ virFreeConnect(virConnectPtr conn) {
virHashFree
(
conn
->
networks
,
(
virHashDeallocator
)
virNetworkFreeName
);
if
(
conn
->
hashes_mux
!=
NULL
)
xmlFreeMutex
(
conn
->
hashes_mux
);
virResetError
(
&
conn
->
err
);
free
(
conn
);
return
(
0
);
}
...
...
src/iptables.c
浏览文件 @
2b3c49b6
...
...
@@ -246,7 +246,7 @@ iptRulesRemove(iptRules *rules,
int
i
;
for
(
i
=
0
;
i
<
rules
->
nrules
;
i
++
)
if
(
!
strcmp
(
rules
->
rules
[
i
].
rule
,
strdup
(
rule
)
))
if
(
!
strcmp
(
rules
->
rules
[
i
].
rule
,
rule
))
break
;
if
(
i
>=
rules
->
nrules
)
...
...
src/qemu_driver.c
浏览文件 @
2b3c49b6
...
...
@@ -341,6 +341,9 @@ qemudShutdown(void) {
if
(
qemu_driver
->
networkAutostartDir
)
free
(
qemu_driver
->
networkAutostartDir
);
if
(
qemu_driver
->
vncTLSx509certdir
)
free
(
qemu_driver
->
vncTLSx509certdir
);
if
(
qemu_driver
->
brctl
)
brShutdown
(
qemu_driver
->
brctl
);
if
(
qemu_driver
->
iptables
)
...
...
src/remote_internal.c
浏览文件 @
2b3c49b6
...
...
@@ -3052,20 +3052,13 @@ server_error (virConnectPtr conn, remote_error *err)
dom
=
err
->
dom
?
get_nonnull_domain
(
conn
,
*
err
->
dom
)
:
NULL
;
net
=
err
->
net
?
get_nonnull_network
(
conn
,
*
err
->
net
)
:
NULL
;
/* These strings are nullable. OK to ignore the return value
* of strdup since these strings are informational.
*/
char
*
str1
=
err
->
str1
?
strdup
(
*
err
->
str1
)
:
NULL
;
char
*
str2
=
err
->
str2
?
strdup
(
*
err
->
str2
)
:
NULL
;
char
*
str3
=
err
->
str3
?
strdup
(
*
err
->
str3
)
:
NULL
;
char
*
message
=
err
->
message
?
strdup
(
*
err
->
message
)
:
NULL
;
__virRaiseError
(
conn
,
dom
,
net
,
err
->
domain
,
err
->
code
,
err
->
level
,
str1
,
str2
,
str3
,
err
->
str1
?
*
err
->
str1
:
NULL
,
err
->
str2
?
*
err
->
str2
:
NULL
,
err
->
str3
?
*
err
->
str3
:
NULL
,
err
->
int1
,
err
->
int2
,
"%s"
,
message
);
"%s"
,
err
->
message
?
*
err
->
message
:
NULL
);
}
/* get_nonnull_domain and get_nonnull_network turn an on-wire
...
...
src/virsh.c
浏览文件 @
2b3c49b6
...
...
@@ -4780,7 +4780,8 @@ static int
vshDeinit
(
vshControl
*
ctl
)
{
vshCloseLogFile
(
ctl
);
if
(
ctl
->
name
)
free
(
ctl
->
name
);
if
(
ctl
->
conn
)
{
if
(
virConnectClose
(
ctl
->
conn
)
!=
0
)
{
ctl
->
conn
=
NULL
;
/* prevent recursive call from vshError() */
...
...
@@ -4788,6 +4789,8 @@ vshDeinit(vshControl * ctl)
"failed to disconnect from the hypervisor"
);
}
}
virResetLastError
();
return
TRUE
;
}
...
...
@@ -4985,11 +4988,15 @@ main(int argc, char **argv)
ctl
->
name
=
strdup
(
defaultConn
);
}
if
(
!
vshParseArgv
(
ctl
,
argc
,
argv
))
if
(
!
vshParseArgv
(
ctl
,
argc
,
argv
))
{
vshDeinit
(
ctl
);
exit
(
EXIT_FAILURE
);
}
if
(
!
vshInit
(
ctl
))
if
(
!
vshInit
(
ctl
))
{
vshDeinit
(
ctl
);
exit
(
EXIT_FAILURE
);
}
if
(
!
ctl
->
imode
)
{
ret
=
vshCommandRun
(
ctl
,
ctl
->
cmd
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录