Page MenuHomeFreeBSD

vidcontrol: improve error handling
AbandonedPublic

Authored by emaste on May 2 2016, 6:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 3, 7:01 AM
Unknown Object (File)
Sun, Dec 1, 7:32 PM
Unknown Object (File)
Mon, Nov 25, 8:47 AM
Unknown Object (File)
Sun, Nov 24, 4:51 AM
Unknown Object (File)
Sat, Nov 23, 11:23 AM
Unknown Object (File)
Sat, Nov 23, 1:19 AM
Unknown Object (File)
Thu, Nov 21, 4:25 AM
Unknown Object (File)
Wed, Nov 20, 11:25 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.