Repository navigation
Commit f2b0dae
committed
fix(subprocess): return EMPTY before marking when the /proc scan collected nothing
Jenkins DeusData#95 failed in lint-cppcheck (ctunullpointer): when readdir
returned no usable entries, procs stayed NULL and was passed to
cbm_linux_probe_mark_tree, which calls qsort on it. A zero count made
that harmless at runtime, but passing NULL to qsort is undefined.
The probe now returns CBM_PROC_TREE_RSS_EMPTY directly when nothing was
collected, matching the result the loop would have produced.
`scripts/lint.sh --ci` and the subprocess suite (61 pass) pass locally.1 parent e5a4dc0 commit f2b0dae
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
948 | 948 | | |
949 | 949 | | |
950 | 950 | | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
951 | 955 | | |
952 | 956 | | |
953 | 957 | | |
| |||
0 commit comments