Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
5a814012
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看板
提交
5a814012
编写于
3月 04, 2011
作者:
P
Phil Petty
提交者:
Eric Blake
3月 04, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixes for several memory leaks
Signed-off-by:
N
Eric Blake
<
eblake@redhat.com
>
上级
a9f35c48
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
35 addition
and
19 deletion
+35
-19
AUTHORS
AUTHORS
+1
-0
src/conf/secret_conf.c
src/conf/secret_conf.c
+2
-1
src/nwfilter/nwfilter_gentech_driver.c
src/nwfilter/nwfilter_gentech_driver.c
+2
-2
src/remote/remote_driver.c
src/remote/remote_driver.c
+6
-0
src/util/conf.c
src/util/conf.c
+9
-8
src/util/storage_file.c
src/util/storage_file.c
+4
-3
src/util/xml.c
src/util/xml.c
+3
-2
tools/virsh.c
tools/virsh.c
+8
-3
未找到文件。
AUTHORS
浏览文件 @
5a814012
...
...
@@ -156,6 +156,7 @@ Patches have also been contributed by:
Michal Novotny <minovotn@redhat.com>
Christophe Fergeau <teuf@gnome.org>
Markus Groß <gross@univention.de>
Phil Petty <phpetty@cisco.com>
[....send patches to get your name here....]
...
...
src/conf/secret_conf.c
浏览文件 @
5a814012
/*
* secret_conf.c: internal <secret> XML handling
*
* Copyright (C) 2009 Red Hat, Inc.
* Copyright (C) 2009
, 2011
Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -182,6 +182,7 @@ secretXMLParseNode(xmlDocPtr xml, xmlNodePtr root)
cleanup:
VIR_FREE
(
prop
);
VIR_FREE
(
uuidstr
);
virSecretDefFree
(
def
);
xmlXPathFreeContext
(
ctxt
);
return
ret
;
...
...
src/nwfilter/nwfilter_gentech_driver.c
浏览文件 @
5a814012
/*
* nwfilter_gentech_driver.c: generic technology driver
*
* Copyright (C) 2011 Red Hat, Inc.
* Copyright (C) 2010 IBM Corp.
* Copyright (C) 2010 Stefan Berger
*
...
...
@@ -660,8 +661,6 @@ virNWFilterInstantiate(virConnectPtr conn,
}
virNWFilterUnlockIface
(
ifname
);
VIR_FREE
(
ptrs
);
}
err_exit:
...
...
@@ -670,6 +669,7 @@ err_exit:
virNWFilterRuleInstFree
(
insts
[
j
]);
VIR_FREE
(
insts
);
VIR_FREE
(
ptrs
);
virNWFilterHashTableFree
(
missing_vars
);
...
...
src/remote/remote_driver.c
浏览文件 @
5a814012
...
...
@@ -479,22 +479,27 @@ doRemoteOpen (virConnectPtr conn,
for
(
i
=
0
;
i
<
vars
->
n
;
i
++
)
{
var
=
&
vars
->
p
[
i
];
if
(
STRCASEEQ
(
var
->
name
,
"name"
))
{
VIR_FREE
(
name
);
name
=
strdup
(
var
->
value
);
if
(
!
name
)
goto
out_of_memory
;
var
->
ignore
=
1
;
}
else
if
(
STRCASEEQ
(
var
->
name
,
"command"
))
{
VIR_FREE
(
command
);
command
=
strdup
(
var
->
value
);
if
(
!
command
)
goto
out_of_memory
;
var
->
ignore
=
1
;
}
else
if
(
STRCASEEQ
(
var
->
name
,
"socket"
))
{
VIR_FREE
(
sockname
);
sockname
=
strdup
(
var
->
value
);
if
(
!
sockname
)
goto
out_of_memory
;
var
->
ignore
=
1
;
}
else
if
(
STRCASEEQ
(
var
->
name
,
"auth"
))
{
VIR_FREE
(
authtype
);
authtype
=
strdup
(
var
->
value
);
if
(
!
authtype
)
goto
out_of_memory
;
var
->
ignore
=
1
;
}
else
if
(
STRCASEEQ
(
var
->
name
,
"netcat"
))
{
VIR_FREE
(
netcat
);
netcat
=
strdup
(
var
->
value
);
if
(
!
netcat
)
goto
out_of_memory
;
var
->
ignore
=
1
;
...
...
@@ -511,6 +516,7 @@ doRemoteOpen (virConnectPtr conn,
else
priv
->
debugLog
=
stderr
;
}
else
if
(
STRCASEEQ
(
var
->
name
,
"pkipath"
))
{
VIR_FREE
(
pkipath
);
pkipath
=
strdup
(
var
->
value
);
if
(
!
pkipath
)
goto
out_of_memory
;
var
->
ignore
=
1
;
...
...
src/util/conf.c
浏览文件 @
5a814012
/**
* conf.c: parser for a subset of the Python encoded Xen configuration files
*
* Copyright (C) 2006
, 2007, 2008, 2009, 2010
Red Hat, Inc.
* Copyright (C) 2006
-2011
Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
...
...
@@ -648,22 +648,23 @@ virConfParseStatement(virConfParserCtxtPtr ctxt)
SKIP_BLANKS_AND_EOL
;
if
(
CUR
==
'#'
)
{
return
(
virConfParseComment
(
ctxt
)
);
return
virConfParseComment
(
ctxt
);
}
name
=
virConfParseName
(
ctxt
);
if
(
name
==
NULL
)
return
(
-
1
)
;
return
-
1
;
SKIP_BLANKS
;
if
(
CUR
!=
'='
)
{
virConfError
(
ctxt
,
VIR_ERR_CONF_SYNTAX
,
_
(
"expecting an assignment"
));
return
(
-
1
);
VIR_FREE
(
name
);
return
-
1
;
}
NEXT
;
SKIP_BLANKS
;
value
=
virConfParseValue
(
ctxt
);
if
(
value
==
NULL
)
{
VIR_FREE
(
name
);
return
(
-
1
)
;
return
-
1
;
}
SKIP_BLANKS
;
if
(
CUR
==
'#'
)
{
...
...
@@ -675,16 +676,16 @@ virConfParseStatement(virConfParserCtxtPtr ctxt)
virReportOOMError
();
VIR_FREE
(
name
);
virConfFreeValue
(
value
);
return
(
-
1
)
;
return
-
1
;
}
}
if
(
virConfAddEntry
(
ctxt
->
conf
,
name
,
value
,
comm
)
==
NULL
)
{
VIR_FREE
(
name
);
virConfFreeValue
(
value
);
VIR_FREE
(
comm
);
return
(
-
1
)
;
return
-
1
;
}
return
(
0
)
;
return
0
;
}
/**
...
...
src/util/storage_file.c
浏览文件 @
5a814012
/*
* storage_file.c: file utility functions for FS storage backend
*
* Copyright (C) 2007-201
0
Red Hat, Inc.
* Copyright (C) 2007-201
1
Red Hat, Inc.
* Copyright (C) 2007-2008 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
...
...
@@ -838,8 +838,9 @@ virStorageFileGetMetadataFromFD(const char *path,
if
(
format
<
0
||
format
>=
VIR_STORAGE_FILE_LAST
)
{
virReportSystemError
(
EINVAL
,
_
(
"unknown storage file format %d"
),
format
);
return
-
1
;
virReportSystemError
(
EINVAL
,
_
(
"unknown storage file format %d"
),
format
);
goto
cleanup
;
}
ret
=
virStorageFileGetMetadataFromBuf
(
format
,
path
,
head
,
len
,
meta
);
...
...
src/util/xml.c
浏览文件 @
5a814012
...
...
@@ -105,9 +105,10 @@ virXPathStringLimit(const char *xpath,
if
(
tmp
!=
NULL
&&
strlen
(
tmp
)
>=
maxlen
)
{
virXMLError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"
\'
%s
\'
value longer than %zd bytes
in virXPathStringLimit()
"
),
_
(
"
\'
%s
\'
value longer than %zd bytes"
),
xpath
,
maxlen
);
return
NULL
;
VIR_FREE
(
tmp
);
return
NULL
;
}
return
tmp
;
...
...
tools/virsh.c
浏览文件 @
5a814012
...
...
@@ -9518,6 +9518,8 @@ cmdCd(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
{
const
char
*
dir
;
int
found
;
int
ret
=
TRUE
;
bool
dir_malloced
=
false
;
if
(
!
ctl
->
imode
)
{
vshError
(
ctl
,
"%s"
,
_
(
"cd: command valid only in interactive mode"
));
...
...
@@ -9528,16 +9530,19 @@ cmdCd(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
if
(
!
found
)
{
uid_t
uid
=
geteuid
();
dir
=
virGetUserDirectory
(
uid
);
dir_malloced
=
!!
dir
;
}
if
(
!
dir
)
dir
=
"/"
;
if
(
chdir
(
dir
)
==
-
1
)
{
if
(
chdir
(
dir
)
==
-
1
)
{
vshError
(
ctl
,
_
(
"cd: %s: %s"
),
strerror
(
errno
),
dir
);
ret
urn
FALSE
;
ret
=
FALSE
;
}
return
TRUE
;
if
(
dir_malloced
)
VIR_FREE
(
dir
);
return
ret
;
}
#endif
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录