mirror of https://gitee.com/openkylin/libvirt.git
* src/virsh.c: bad pointer/int mismatch fixes from Richard Jones
daniel
This commit is contained in:
parent
03d48a87ed
commit
b35adb3836
|
@ -1,3 +1,7 @@
|
|||
Fri Mar 9 14:43:11 CET 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/virsh.c: bad pointer/int mismatch fixes from Richard Jones
|
||||
|
||||
Thu Mar 8 22:07:14 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* qemud/conf.c: Fix double free in XML parsing routine
|
||||
|
|
|
@ -1957,15 +1957,16 @@ cmdNetworkList(vshControl * ctl, vshCmd * cmd ATTRIBUTE_UNUSED)
|
|||
return FALSE;
|
||||
}
|
||||
if (maxactive) {
|
||||
activeNames = vshMalloc(ctl, sizeof(int) * maxactive);
|
||||
activeNames = vshMalloc(ctl, sizeof(char *) * maxactive);
|
||||
|
||||
if ((maxactive = virConnectListNetworks(ctl->conn, &activeNames[0], maxactive)) < 0) {
|
||||
if ((maxactive = virConnectListNetworks(ctl->conn, activeNames,
|
||||
maxactive)) < 0) {
|
||||
vshError(ctl, FALSE, _("Failed to list active networks"));
|
||||
free(activeNames);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
qsort(&activeNames[0], maxactive, sizeof(int), namesorter);
|
||||
qsort(&activeNames[0], maxactive, sizeof(char *), namesorter);
|
||||
}
|
||||
}
|
||||
if (inactive) {
|
||||
|
|
Loading…
Reference in New Issue