Page MenuHomeFreeBSD

Fix a memory leak in bhyve
AbandonedPublic

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

Details

Summary

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

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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 removed a reviewer: pfg.Apr 27 2019, 2:30 PM
pfg resigned from this revision.
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.
markj abandoned this revision.