Make sure that we don't dereference NULL
The code was actually safe, because b should never be null, because if rvalue is empty, a different branch is taken. But we *do* check for NULL in the loop above, so it's better to also check here for symmetry.
This commit is contained in:
@@ -1860,7 +1860,8 @@ int config_parse_documentation(const char *unit,
|
||||
free(*a);
|
||||
}
|
||||
}
|
||||
*b = NULL;
|
||||
if (b)
|
||||
*b = NULL;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user