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)
Dec 13 2023, 6:27 AM
Unknown Object (File)
Nov 26 2023, 6:56 AM
Unknown Object (File)
Aug 26 2023, 11:12 PM
Unknown Object (File)
Jul 24 2023, 12:32 AM
Unknown Object (File)
Jul 20 2023, 4:07 AM
Unknown Object (File)
Jul 6 2023, 5:04 PM
Unknown Object (File)
Jun 27 2023, 7:09 AM
Unknown Object (File)
Jun 27 2023, 7:07 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 Skipped
Unit
Tests Skipped

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.