mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 01:43:23 +00:00
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
This commit is contained in:
parent
3166570f7c
commit
f969e393a9
@ -1,3 +1,9 @@
|
|||||||
|
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>
|
Wed Jun 3 15:32:52 BST 2009 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* src/vbox/vbox_tmpl.c: Add NUMA memory APIs
|
* src/vbox/vbox_tmpl.c: Add NUMA memory APIs
|
||||||
|
@ -2943,7 +2943,8 @@ xenXMDomainDetachDevice(virDomainPtr domain, const char *xml) {
|
|||||||
if (i < (def->ndisks - 1))
|
if (i < (def->ndisks - 1))
|
||||||
memmove(def->disks + i,
|
memmove(def->disks + i,
|
||||||
def->disks + i + 1,
|
def->disks + i + 1,
|
||||||
def->ndisks - (i + 1));
|
sizeof(*def->disks) *
|
||||||
|
(def->ndisks - (i + 1)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2960,7 +2961,8 @@ xenXMDomainDetachDevice(virDomainPtr domain, const char *xml) {
|
|||||||
if (i < (def->nnets - 1))
|
if (i < (def->nnets - 1))
|
||||||
memmove(def->nets + i,
|
memmove(def->nets + i,
|
||||||
def->nets + i + 1,
|
def->nets + i + 1,
|
||||||
def->nnets - (i + 1));
|
sizeof(*def->nets) *
|
||||||
|
(def->nnets - (i + 1)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user