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
+1
View File
@@ -158,6 +158,7 @@ int find_suitable_partition(
int r;
assert(device);
POINTER_MAY_BE_NULL(partition_type);
assert(ret);
r = fdisk_new_context_at(AT_FDCWD, device, /* read_only= */ true, /* sector_size= */ UINT32_MAX, &c);
+1
View File
@@ -477,6 +477,7 @@ static int resource_load_from_web(
int r;
assert(rr);
POINTER_MAY_BE_NULL(web_cache);
ci = web_cache ? web_cache_get_item(*web_cache, rr->path, verify) : NULL;
if (ci) {
+1
View File
@@ -1009,6 +1009,7 @@ static int callout_context_new(const Transfer *t, const Instance *i, TransferPro
assert(t);
assert(i);
assert(cb);
assert(ret);
ctx = new(CalloutContext, 1);
if (!ctx)