[RTEMS Project] #4417: Explanations.cc: Resource leak error spotted by Coverity

RTEMS trac trac at rtems.org
Mon May 17 16:21:48 UTC 2021


#4417: Explanations.cc: Resource leak error spotted by Coverity
-----------------------+---------------------
 Reporter:  Ryan Long  |       Owner:  (none)
     Type:  defect     |      Status:  new
 Priority:  normal     |   Milestone:  6.1
Component:  tool       |     Version:  6
 Severity:  normal     |  Resolution:
 Keywords:             |  Blocked By:
 Blocking:             |
-----------------------+---------------------

Comment (by Ryan Long):

 Replying to [ticket:4417 Ryan Long]:
 > CID 1399608: Resource leak in load().
 > {{{
 > CID 1399608 (#1 of 1): Resource leak (RESOURCE_LEAK)9. leaked_storage:
 Variable explain going out of scope leaks the storage it points to.
 > }}}
 Also,
 CID 1399611: Resource leak in load().
 {{{
 48    while ( 1 ) {
    4. alloc_fn: Storage is returned from allocation function operator new.
    5. var_assign: Assigning: e = storage returned from new
 Coverage::Explanation.
    CID 1399611 (#2 of 2): Resource leak (RESOURCE_LEAK)21. overwrite_var:
 Overwriting e in e = new Coverage::Explanation leaks the storage that e
 points to.
  49      e = new Explanation;
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/4417#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list