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

libcgroup / libcgroup / 23312229513
56%

Build:
DEFAULT BRANCH: main
Ran 19 Mar 2026 07:09PM UTC
Jobs 5
Files 39
Run time 1min
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 07:07PM UTC coverage: 56.108% (-0.09%) from 56.2%
23312229513

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>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>

6 of 12 new or added lines in 1 file covered. (50.0%)

276 existing lines in 2 files now uncovered.

5631 of 10036 relevant lines covered (56.11%)

611.72 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
41.15
-0.73% src/tools/cgxget.c

Uncovered Existing Lines

Lines Coverage ∆ File
95
77.6
-1.16% src/tools/cgget.c
181
41.15
-0.73% src/tools/cgxget.c
Jobs
ID Job ID Ran Files Coverage
1 Sudo Tests - 23312229513.1 19 Mar 2026 07:10PM UTC 37
31.64
GitHub Action Run
2 No Container Tests - 23312229513.2 19 Mar 2026 07:09PM UTC 37
44.31
GitHub Action Run
3 Container Tests - 23312229513.3 19 Mar 2026 07:10PM UTC 28
35.52
GitHub Action Run
4 No systemd Functional Tests - 23312229513.4 19 Mar 2026 07:10PM UTC 28
46.6
GitHub Action Run
5 Unit Tests - 23312229513.5 19 Mar 2026 07:09PM UTC 37
11.07
GitHub Action Run
Source Files on build 23312229513
  • Tree
  • List 39
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 345bede0 on github
  • Prev Build on main (#23309790365)
  • Next Build on main (#23312525885)
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