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:
@@ -757,12 +757,13 @@ int mount_all(const char *dest,
|
||||
}
|
||||
|
||||
static int parse_mount_bind_options(const char *options, unsigned long *open_tree_flags, char **mount_opts, RemountIdmapping *idmapping) {
|
||||
unsigned long flags = *open_tree_flags;
|
||||
unsigned long flags = *ASSERT_PTR(open_tree_flags);
|
||||
char *opts = NULL;
|
||||
RemountIdmapping new_idmapping = *idmapping;
|
||||
RemountIdmapping new_idmapping = *ASSERT_PTR(idmapping);
|
||||
int r;
|
||||
|
||||
assert(options);
|
||||
assert(mount_opts);
|
||||
|
||||
for (;;) {
|
||||
_cleanup_free_ char *word = NULL;
|
||||
|
||||
@@ -177,6 +177,7 @@ int setup_veth(const char *machine_name,
|
||||
assert(machine_name);
|
||||
assert(pidref_is_set(pid));
|
||||
assert(iface_name);
|
||||
assert(provided_mac);
|
||||
|
||||
/* Use two different interface name prefixes depending whether
|
||||
* we are in bridge mode or not. */
|
||||
|
||||
@@ -2082,6 +2082,7 @@ int oci_load(FILE *f, const char *bundle, Settings **ret) {
|
||||
int r;
|
||||
|
||||
assert_se(bundle);
|
||||
assert(ret);
|
||||
|
||||
path = strjoina(bundle, "/config.json");
|
||||
|
||||
|
||||
@@ -445,6 +445,8 @@ static int parse_capability_spec(const char *spec, uint64_t *ret_mask) {
|
||||
uint64_t mask = 0;
|
||||
int r;
|
||||
|
||||
assert(ret_mask);
|
||||
|
||||
for (;;) {
|
||||
_cleanup_free_ char *t = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user