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:
@@ -345,6 +345,7 @@ int unit_name_unescape(const char *f, char **ret) {
|
||||
char *t;
|
||||
|
||||
assert(f);
|
||||
assert(ret);
|
||||
|
||||
r = strdup(f);
|
||||
if (!r)
|
||||
@@ -547,6 +548,8 @@ int unit_name_hash_long(const char *name, char **ret) {
|
||||
le64_t h;
|
||||
size_t len;
|
||||
|
||||
assert(ret);
|
||||
|
||||
if (strlen(name) < UNIT_NAME_MAX)
|
||||
return -EMSGSIZE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user