many: fix remaining check-pointer-deref issues

The updated parsing_hacks.h file uncovered a bunch of extra
things that the check-pointer-deref coccinelle script flags.

This commit fixes them to make the tree check-pointer-deref clean.
This commit is contained in:
Michael Vogt
2026-04-12 15:27:15 +02:00
parent 3c6a713836
commit bd141bd818
126 changed files with 342 additions and 9 deletions
+4
View File
@@ -1256,6 +1256,8 @@ bool cg_needs_escape(const char *p) {
int cg_escape(const char *p, char **ret) {
_cleanup_free_ char *n = NULL;
assert(ret);
/* This implements very minimal escaping for names to be used as file names in the cgroup tree: any
* name which might conflict with a kernel name or is prefixed with '_' is prefixed with a '_'. That
* way, when reading cgroup names it is sufficient to remove a single prefixing underscore if there
@@ -1652,6 +1654,8 @@ int cg_mask_supported_subtree(const char *root, CGroupMask *ret) {
CGroupMask mask;
int r;
assert(ret);
/* Determines the mask of supported cgroup controllers. Only includes controllers we can make sense of and that
* are actually accessible. Only covers real controllers, i.e. not the CGROUP_CONTROLLER_BPF_xyz
* pseudo-controllers. */