Page MenuHomeFreeBSD

vidcontrol: improve error handling
AbandonedPublic

Authored by emaste on May 2 2016, 6:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 8, 4:23 PM
Unknown Object (File)
Sun, Jan 26, 10:56 AM
Unknown Object (File)
Jan 2 2025, 4:05 AM
Unknown Object (File)
Dec 30 2024, 5:29 AM
Unknown Object (File)
Dec 28 2024, 2:37 AM
Unknown Object (File)
Dec 21 2024, 2:47 AM
Unknown Object (File)
Dec 3 2024, 7:01 AM
Unknown Object (File)
Dec 1 2024, 7:32 PM
Subscribers

Details

Summary

We can just exit in the case of errors.

PR: 209078
Reported by: cturt@hardenedbsd.org

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

emaste retitled this revision from to vidcontrol: improve error handling.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added a reviewer: cturt_hardenedbsd.org.

also free mappings in success case

ngie added a reviewer: ngie.
ngie added a subscriber: ngie.

This is going to increase the number of "false positives" with Coverity (err* with fopened FILE*), but the change LGTM.

This revision is now accepted and ready to land.May 2 2016, 6:48 PM
usr.sbin/vidcontrol/vidcontrol.c
458–459

Thank you for fixing this BTW :)..

This is going to increase the number of "false positives" with Coverity (err* with fopened FILE*)

I'm not sure exactly what you mean here, can you clarify?

This is going to increase the number of "false positives" with Coverity (err* with fopened FILE*)

I'm not sure exactly what you mean here, can you clarify?

I'll have to go back and look. IIRC, err* wasn't instrumented properly with Coverity and file descriptors and items after the call were marked as false positives.

Change in D8176 committed instead.