提交 f969e393 编写于 作者: D Daniel Veillard

Fix a memory error on Xen device removal

* src/xm_internals.c: the memory shrinking on device removal
  didn't copy the right amount of memory, patch by Daniel Berrange
  fixes #497051
daniel
上级 3166570f
Thu Jun 4 15:54:24 CEST 2009 Daniel Veillard <veillard@redhat.com>
* src/xm_internals.c: the memory shrinking on device removal
didn't copy the right amount of memory, patch by Daniel Berrange
fixes #497051
Wed Jun 3 15:32:52 BST 2009 Daniel P. Berrange <berrange@redhat.com>
* src/vbox/vbox_tmpl.c: Add NUMA memory APIs
......
......@@ -2943,7 +2943,8 @@ xenXMDomainDetachDevice(virDomainPtr domain, const char *xml) {
if (i < (def->ndisks - 1))
memmove(def->disks + i,
def->disks + i + 1,
def->ndisks - (i + 1));
sizeof(*def->disks) *
(def->ndisks - (i + 1)));
break;
}
}
......@@ -2960,7 +2961,8 @@ xenXMDomainDetachDevice(virDomainPtr domain, const char *xml) {
if (i < (def->nnets - 1))
memmove(def->nets + i,
def->nets + i + 1,
def->nnets - (i + 1));
sizeof(*def->nets) *
(def->nnets - (i + 1)));
break;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册