Page MenuHomeFreeBSD

Fix a memory leak in bhyve
AbandonedPublic

Authored by markj on Mar 14 2017, 9:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 5:00 PM
Unknown Object (File)
Mon, Nov 18, 8:30 AM
Unknown Object (File)
Sun, Nov 10, 8:52 PM
Unknown Object (File)
Sat, Nov 9, 9:59 PM
Unknown Object (File)
Sat, Nov 9, 11:21 AM
Unknown Object (File)
Sat, Nov 9, 8:32 AM
Unknown Object (File)
Tue, Oct 29, 2:35 PM
Unknown Object (File)
Tue, Oct 29, 9:28 AM

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 - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

pfg edited edge metadata.

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

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 added a subscriber: araujo.

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

pfg removed a reviewer: pfg.

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

Concur, but not sure how to force it closed.

markj abandoned this revision.
markj added a reviewer: trix_juniper.net.