Coverity Scan on rtems_libio_post_driver()

Gedare Bloom gedare at rtems.org
Mon Sep 16 21:13:15 UTC 2013


I think your analysis is right, but I would mark it "intentional"

-Gedare

On Mon, Sep 16, 2013 at 5:11 PM, Joel Sherrill
<joel.sherrill at oarcorp.com> wrote:
> 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
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel



More information about the devel mailing list