RTEMS Tools | Coverity Reported a Leak in libdwarf (#10)
Joel Sherrill (@joel)
gitlab at rtems.org
Mon Jul 8 17:02:37 UTC 2024
Joel Sherrill created an issue: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/issues/10
Assignee: Chris Johns
## Summary
Coverity Scan reports a resource leak.
** CID 1595466: Resource leaks (RESOURCE_LEAK)
/rtemstoolkit/elftoolchain/libdwarf/dwarf_abbrev.c: 51 in dwarf_get_abbrev()
## Details
This is the detailed information provided.
```
*** CID 1595466: Resource leaks (RESOURCE_LEAK)
/rtemstoolkit/elftoolchain/libdwarf/dwarf_abbrev.c: 51 in dwarf_get_abbrev()
45 ret = _dwarf_abbrev_parse(dbg, NULL, &offset, &ab, error);
46 if (ret != DW_DLE_NONE) {
47 if (ret == DW_DLE_NO_ENTRY) {
48 DWARF_SET_ERROR(dbg, error, DW_DLE_NO_ENTRY);
49 return (DW_DLV_NO_ENTRY);
50 } else
>>> CID 1595466: Resource leaks (RESOURCE_LEAK)
>>> Variable "ab" going out of scope leaks the storage it points to.
51 return (DW_DLV_ERROR);
52 }
53
54 *return_abbrev = ab;
55 *length = ab->ab_length;
56 *attr_count = ab->ab_atnum;
```
--
View it on GitLab: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/issues/10
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240708/83c99584/attachment.htm>
More information about the bugs
mailing list