Coverity Scan on rtems_libio_post_driver()

Joel Sherrill joel.sherrill at OARcorp.com
Mon Sep 16 21:11:02 UTC 2013


Hi

Ids 1063883, 1063884, and 1063885.

I was looking at the items Coverity Scan marks as
resource leaks and rtems_libio_post_driver() is
marked for three leaks because the open for
stdin, out, and error assign the integer fd to
a local variable which falls out of scope.

cpukit/libcsupport/open_dev_console.c

I think the analysis is technically correct. We
assign the fd returned by open() to a local
variable which falls out of scope but these
are fd 0, 1, and 2 which are special. Coverity
doesn't know these are special.

I am prone to mark these as false positive.
Before I do that, I would appreciate someone
confirming my analysis.

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985




More information about the devel mailing list