Allocate key description in volume key.

The key description is now allocated by volume key wrappers.
This commit is contained in:
Milan Broz
2018-02-15 13:06:11 +01:00
parent d7686201dc
commit 1ac353d24e
6 changed files with 84 additions and 86 deletions

View File

@@ -1482,7 +1482,7 @@ static int _dm_query_crypt(uint32_t get_flags,
if (get_flags & DM_ACTIVE_CRYPT_KEY) {
if (key_[0] == ':') {
key_desc = strdup(strpbrk(strpbrk(key_ + 1, ":") + 1, ":") + 1);
key_desc = strpbrk(strpbrk(key_ + 1, ":") + 1, ":") + 1;
if (!key_desc) {
r = -ENOMEM;
goto err;