mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-16 21:29:59 +01:00
Fix a bug in vk description parsing helper.
Fix a path with default kernel key type assumed. It did not check correctly for return value from asprintf and would leak the allocated memory instead.
This commit is contained in:
@@ -1635,7 +1635,7 @@ static int parse_vk_description(const char *key_description, char **ret_key_desc
|
||||
r = tmp ? 0 : -ENOMEM;
|
||||
}
|
||||
|
||||
if (!r)
|
||||
if (r >= 0)
|
||||
*ret_key_description = tmp;
|
||||
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user