mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-19 06:40:08 +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;
|
r = tmp ? 0 : -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!r)
|
if (r >= 0)
|
||||||
*ret_key_description = tmp;
|
*ret_key_description = tmp;
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
Reference in New Issue
Block a user