summaryrefslogtreecommitdiff
path: root/src/cryptenroll
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptenroll')
-rw-r--r--src/cryptenroll/cryptenroll-list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptenroll/cryptenroll-list.c b/src/cryptenroll/cryptenroll-list.c
index d56deaa6b1..c3ad819430 100644
--- a/src/cryptenroll/cryptenroll-list.c
+++ b/src/cryptenroll/cryptenroll-list.c
@@ -11,8 +11,8 @@ int list_enrolled(struct crypt_device *cd) {
int slot;
const char *type;
} *keyslot_metadata = NULL;
- size_t n_keyslot_metadata = 0, n_keyslot_metadata_allocated = 0;
_cleanup_(table_unrefp) Table *t = NULL;
+ size_t n_keyslot_metadata = 0;
int slot_max, r;
TableCell *cell;
@@ -27,7 +27,7 @@ int list_enrolled(struct crypt_device *cd) {
if (!IN_SET(status, CRYPT_SLOT_ACTIVE, CRYPT_SLOT_ACTIVE_LAST))
continue;
- if (!GREEDY_REALLOC(keyslot_metadata, n_keyslot_metadata_allocated, n_keyslot_metadata+1))
+ if (!GREEDY_REALLOC(keyslot_metadata, n_keyslot_metadata+1))
return log_oom();
keyslot_metadata[n_keyslot_metadata++] = (struct keyslot_metadata) {