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:
@@ -284,6 +284,9 @@ int utf8_to_ascii(const char *str, char replacement_char, char **ret) {
|
||||
/* Convert to a string that has only ASCII chars, replacing anything that is not ASCII
|
||||
* by replacement_char. */
|
||||
|
||||
assert(str);
|
||||
assert(ret);
|
||||
|
||||
_cleanup_free_ char *ans = new(char, strlen(str) + 1);
|
||||
if (!ans)
|
||||
return -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user