hrev45786 adds 2 changesets to branch 'master' old head: b027a0a2f750e957f109e9e872662aca67b4336f new head: ea27e95f489fbb29cedad74788ee607b331f8a2f overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=ea27e95+%5Eb027a0a ---------------------------------------------------------------------------- 27938cb: virtio bus: Fix resource leak. CID 1032283 * bus is allocated but not deleted and not used after an error ea27e95: debuganalyzer: Fix double free. CID 992566 * RemoveRow frees row, thus the delete isn't needed. [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ] ---------------------------------------------------------------------------- 2 files changed, 3 insertions(+), 5 deletions(-) src/add-ons/kernel/busses/virtio/virtio_pci.cpp | 4 ++-- src/apps/debuganalyzer/gui/table/Table.cpp | 4 +--- ############################################################################ Commit: 27938cb64f0598ce14925a4258813742e1c45fa1 URL: http://cgit.haiku-os.org/haiku/commit/?id=27938cb Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> Date: Mon Jun 24 20:18:23 2013 UTC virtio bus: Fix resource leak. CID 1032283 * bus is allocated but not deleted and not used after an error ---------------------------------------------------------------------------- diff --git a/src/add-ons/kernel/busses/virtio/virtio_pci.cpp b/src/add-ons/kernel/busses/virtio/virtio_pci.cpp index 3c3a641..8d2ff0a 100644 --- a/src/add-ons/kernel/busses/virtio/virtio_pci.cpp +++ b/src/add-ons/kernel/busses/virtio/virtio_pci.cpp @@ -252,7 +252,6 @@ init_bus(device_node* node, void** bus_cookie) pci_device_module_info* pci; pci_device* device; - { device_node* parent = gDeviceManager->get_parent_node(node); device_node* pciParent = gDeviceManager->get_parent_node(parent); @@ -276,6 +275,7 @@ init_bus(device_node* node, void** bus_cookie) bus->irq = pciInfo.u.h0.interrupt_line; if (bus->irq == 0 || bus->irq == 0xff) { ERROR("PCI IRQ not assigned\n"); + delete bus; return B_ERROR; } @@ -288,7 +288,7 @@ init_bus(device_node* node, void** bus_cookie) set_status(bus, VIRTIO_CONFIG_STATUS_RESET); set_status(bus, VIRTIO_CONFIG_STATUS_ACK); - TRACE("init_bus() %p node %p pci %p device %p\n", bus, node, + TRACE("init_bus() %p node %p pci %p device %p\n", bus, node, bus->pci, bus->device); *bus_cookie = bus; ############################################################################ Revision: hrev45786 Commit: ea27e95f489fbb29cedad74788ee607b331f8a2f URL: http://cgit.haiku-os.org/haiku/commit/?id=ea27e95 Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> Date: Mon Jun 24 20:22:37 2013 UTC debuganalyzer: Fix double free. CID 992566 * RemoveRow frees row, thus the delete isn't needed. ---------------------------------------------------------------------------- diff --git a/src/apps/debuganalyzer/gui/table/Table.cpp b/src/apps/debuganalyzer/gui/table/Table.cpp index 2eb7b93..2b2b9bc 100644 --- a/src/apps/debuganalyzer/gui/table/Table.cpp +++ b/src/apps/debuganalyzer/gui/table/Table.cpp @@ -640,10 +640,8 @@ Table::TableRowsRemoved(TableModel* model, int32 rowIndex, int32 count) } for (int32 i = rowIndex + count - 1; i >= rowIndex; i--) { - if (BRow* row = fRows.RemoveItemAt(i)) { + if (BRow* row = fRows.RemoveItemAt(i)) RemoveRow(row); - delete row; - } } // re-index the subsequent rows