• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

drakenclimber / libcgroup / 23311009133 / 1
56%
main: 56%

Build:
Build:
LAST BUILD BRANCH: test
DEFAULT BRANCH: main
Ran 19 Mar 2026 06:41PM UTC
Files 37
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Mar 2026 06:38PM UTC coverage: 11.074% (-0.04%) from 11.113%
23311009133.1

push

github

drakenclimber
tools/cgxget: free temporary conversions on failure paths

AddressSanitizer reported an 8-byte leak when convert_cgroups() aborted:

    Direct leak of 8 byte(s) in 1 object(s) allocated from:
        #0 0x... in __interceptor_malloc
        #1 convert_cgroups (<libcgroup-source>/src/tools/cgxget.c:822)
        #2 main (<libcgroup-source>/src/tools/cgxget.c:893)

The helper allocates a scratch cgroup list, but on failures or
ECGNOVERSIONCONVERT it returned without releasing the partially built
array. Worse, when the scratch malloc failed we still treated the
conversion as “success” and left the old list pointing nowhere.

Return an error if the allocation fails, zero-initialise the scratch
list so we can free partially populated slots safely, free every
temporary cgroup before returning on error, and only after a successful
conversion free the original list (including the pointer array) before
swapping in the new one. With these guards in place the ASan leak report
is gone.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>

1123 of 10141 relevant lines covered (11.07%)

1.72 hits per line

Source Files on job Unit Tests - 23311009133.1
  • Tree
  • List 37
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 23311009133
  • 0e41fcd3 on github
  • Prev Job for on test (#23309518013.1)
  • Next Job for on test (#23312294051.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc