[RTEMS Project] #4296: hexdump-parse.c: Resource leak error spotted by Coverity

RTEMS trac trac at rtems.org
Thu Mar 4 15:51:02 UTC 2021


#4296: hexdump-parse.c: Resource leak error spotted by Coverity
------------------------+--------------------
  Reporter:  Ryan Long  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  normal     |  Milestone:  6.1
 Component:  lib        |    Version:  6
  Severity:  normal     |   Keywords:
Blocked By:             |   Blocking:
------------------------+--------------------
 CID 26032: Resource leak in rtems_shell_hexdump_rewrite().

 {{{
 457#ifdef DEBUG
 458        for (fu = fs->nextfu; fu; fu = fu->nextfu) {
 459                (void)printf("fmt:");
 460                for (pr = fu->nextpr; pr; pr = pr->nextpr)
 461                        (void)printf(" {%s}", pr->fmt);
 462                (void)printf("\n");
 463        }
 464#endif
    CID 26032 (#2 of 2): Resource leak (RESOURCE_LEAK)57. leaked_storage:
 Variable nextpr going out of scope leaks the storage it points to.
 465}
 }}}

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


More information about the bugs mailing list