Skip to content

Potential memory-leak #292

@HoshinoStranding

Description

@HoshinoStranding

Hi, I have found a potential memory-leak bug in the project and would like to report it to the maintainers. Can you please help me to check it? Thank you for your effort and patience!

In function pci_dev_add in file common/pci_dev.c, dev is assigned with newly allocated memory at line 295 and then assigned to pci_bus->dev_list at line 320, wherepci_bus is the 1st param of the function. In function dev_c2600_pci_init (in file common/dev_c2600_pci.c) , d->bus is used as the 1st param of call for pci_dev_add at line 193 and d is a local variable. The allocated memory (d->bus->dev_list) is not freed, which may cause a memory-leak bug.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions