提交 7be5c26d 编写于 作者: J Jim Meyering

xenXMDomainDefineXML: remove dead store and useless/leaky virGetDomain

* src/xen/xm_internal.c (xenXMDomainDefineXML): Remove useless and
leak-inducing call to virGetDomain, as well as decl of now-unused local.
上级 2cdf29ed
......@@ -2622,7 +2622,6 @@ cleanup:
*/
virDomainPtr xenXMDomainDefineXML(virConnectPtr conn, const char *xml) {
virDomainPtr ret;
virDomainPtr olddomain;
char filename[PATH_MAX];
const char * oldfilename;
virDomainDefPtr def = NULL;
......@@ -2688,10 +2687,6 @@ virDomainPtr xenXMDomainDefineXML(virConnectPtr conn, const char *xml) {
goto error;
}
/* XXX wtf.com is this line for - it appears to be amemory leak */
if (!(olddomain = virGetDomain(conn, def->name, entry->def->uuid)))
goto error;
/* Remove the name -> filename mapping */
if (virHashRemoveEntry(priv->nameConfigMap, def->name, NULL) < 0) {
xenXMError(VIR_ERR_INTERNAL_ERROR,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册