* src/virsh.c: bad pointer/int mismatch fixes from Richard Jones

daniel
This commit is contained in:
Daniel Veillard 2007-03-09 13:44:24 +00:00
parent 03d48a87ed
commit b35adb3836
2 changed files with 8 additions and 3 deletions

View File

@ -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

View File

@ -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) {