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:
@@ -44,6 +44,8 @@ static int populate_uid_cache(const char *root, Hashmap **ret) {
|
||||
_cleanup_hashmap_free_ Hashmap *cache = NULL;
|
||||
int r;
|
||||
|
||||
assert(ret);
|
||||
|
||||
cache = hashmap_new(&uid_gid_hash_ops);
|
||||
if (!cache)
|
||||
return -ENOMEM;
|
||||
@@ -85,6 +87,8 @@ static int populate_gid_cache(const char *root, Hashmap **ret) {
|
||||
_cleanup_hashmap_free_ Hashmap *cache = NULL;
|
||||
int r;
|
||||
|
||||
assert(ret);
|
||||
|
||||
cache = hashmap_new(&uid_gid_hash_ops);
|
||||
if (!cache)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -289,6 +289,7 @@ static int specifier_directory(
|
||||
unsigned i;
|
||||
int r;
|
||||
|
||||
assert(ret);
|
||||
assert_cc(ELEMENTSOF(paths_system) == ELEMENTSOF(paths_user));
|
||||
paths = arg_runtime_scope == RUNTIME_SCOPE_USER ? paths_user : paths_system;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user