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)
Sat, Dec 14, 10:49 PM
Unknown Object (File)
Tue, Dec 10, 6:31 AM
Unknown Object (File)
Nov 21 2024, 5:00 PM
Unknown Object (File)
Nov 18 2024, 8:30 AM
Unknown Object (File)
Nov 10 2024, 8:52 PM
Unknown Object (File)
Nov 9 2024, 9:59 PM
Unknown Object (File)
Nov 9 2024, 11:21 AM
Unknown Object (File)
Nov 9 2024, 8:32 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.