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

drakenclimber / libcgroup / 23311009133
56%
main: 56%

Build:
Build:
LAST BUILD BRANCH: test
DEFAULT BRANCH: main
Ran 19 Mar 2026 06:40PM 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 06:38PM UTC coverage: 56.108% (-0.09%) from 56.2%
23311009133

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>

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.05 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 Unit Tests - 23311009133.1 19 Mar 2026 06:40PM UTC 37
11.07
GitHub Action Run
2 Container Tests - 23311009133.2 19 Mar 2026 06:41PM UTC 28
35.52
GitHub Action Run
3 No systemd Functional Tests - 23311009133.3 19 Mar 2026 06:41PM UTC 28
46.6
GitHub Action Run
4 No Container Tests - 23311009133.4 19 Mar 2026 06:40PM UTC 37
44.33
GitHub Action Run
5 Sudo Tests - 23311009133.5 19 Mar 2026 06:41PM UTC 37
31.64
GitHub Action Run
Source Files on build 23311009133
  • Tree
  • List 39
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0e41fcd3 on github
  • Prev Build on test (#23309518013)
  • Next Build on test (#23312294051)
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