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:
@@ -214,6 +214,8 @@ int cryptsetup_get_volume_key_prefix(
|
||||
const char *uuid;
|
||||
char *s;
|
||||
|
||||
assert(ret);
|
||||
|
||||
uuid = sym_crypt_get_uuid(cd);
|
||||
if (!uuid)
|
||||
return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Failed to get LUKS UUID.");
|
||||
@@ -248,6 +250,8 @@ int cryptsetup_get_volume_key_id(
|
||||
char *hex;
|
||||
int r;
|
||||
|
||||
assert(ret);
|
||||
|
||||
r = cryptsetup_get_volume_key_prefix(cd, volume_name, &prefix);
|
||||
if (r < 0)
|
||||
return log_debug_errno(r, "Failed to get LUKS volume key prefix.");
|
||||
|
||||
Reference in New Issue
Block a user