Page MenuHomeFreeBSD

Fix a memory leak in bhyve

Authored by markj on Mar 14 2017, 9:43 PM.



pci_emul.c pci_parse_slot
It is alway appropiate to free 'str' so remove the if-check.

Test Plan

Use clang's static analyzer, scan-build, to find the problem and later to show resolution.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pfg added a reviewer: grehan.Mar 15 2017, 12:45 AM
pfg edited edge metadata.

The change looks good to me but it isn't my area. Add Peter.

grehan accepted this revision.Mar 15 2017, 1:18 AM
This revision is now accepted and ready to land.Mar 15 2017, 1:18 AM
This revision was automatically updated to reflect the committed changes.
araujo reopened this revision.May 22 2018, 6:05 AM
araujo added a subscriber: araujo.

It breaks pci_emul in other places, needs further investigation.
I'm taking it.

rgrimes edited reviewers, added: bhyve; removed: grehan.Feb 20 2019, 5:57 PM
araujo removed a subscriber: araujo.Feb 22 2019, 1:19 AM
pfg resigned from this revision.Apr 27 2019, 2:30 PM
pfg removed a reviewer: pfg.
markj added a subscriber: markj.May 24 2019, 3:04 PM

It looks like the original code was correct. Is there any reason to keep this review open?

rgrimes resigned from this revision.May 24 2019, 3:23 PM

Concur, but not sure how to force it closed.

markj commandeered this revision.May 24 2019, 3:24 PM
markj abandoned this revision.
markj added a reviewer: