[RTEMS Project] #2496: rtems/c/src/lib/libbsp/sparc/shared/amba/ambapp.c:258: possible bad test ?

RTEMS trac trac at rtems.org
Tue Dec 15 08:13:41 UTC 2015


#2496: rtems/c/src/lib/libbsp/sparc/shared/amba/ambapp.c:258: possible bad test ?
---------------------+--------------------
 Reporter:  dcb      |      Owner:
     Type:  defect   |     Status:  new
 Priority:  normal   |  Milestone:  4.11.1
Component:  General  |    Version:  4.10
 Severity:  normal   |   Keywords:
---------------------+--------------------
 [rtems/c/src/lib/libbsp/sparc/shared/amba/ambapp.c:258]: (error) Memory
 leak: apbdev

         apbdev = ambapp_alloc_dev_struct(DEV_APB_SLV);
         if (!dev)
           return -1;

 Maybe better code

         apbdev = ambapp_alloc_dev_struct(DEV_APB_SLV);
         if (!apbdev)
           return -1;

 Looks like a cut-n-paste error and then some inadequate testing to me.

--
Ticket URL: <http://devel.rtems.org/ticket/2496>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list