Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 4 additions & 20 deletions src/catalog/tde_keyring.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ static char *get_file_value(const char *path, const char *field_name);
#ifdef FRONTEND

static SimplePtrList *scan_key_provider_file(ProviderScanType scanType, void *scanKey, Oid dbOid);
static void simple_list_free(SimplePtrList *list);

#else

Expand Down Expand Up @@ -711,28 +710,12 @@ GetKeyProviderByID(int provider_id, Oid dbOid)
if (providers != NULL)
{
keyring = (GenericKeyring *) providers->head->ptr;
simple_list_free(providers);
simple_ptr_list_destroy(providers);
pfree(providers);
}

return keyring;
}

static void
simple_list_free(SimplePtrList *list)
{
SimplePtrListCell *cell = list->head;

while (cell != NULL)
{
SimplePtrListCell *next;

next = cell->next;
pfree(cell);
cell = next;
}

pfree(list);
}
#endif /* FRONTEND */

/*
Expand Down Expand Up @@ -1089,7 +1072,8 @@ GetKeyProviderByName(const char *provider_name, Oid dbOid)
list_free(providers);
#else
keyring = (GenericKeyring *) providers->head->ptr;
simple_list_free(providers);
simple_ptr_list_destroy(providers);
pfree(providers);
#endif
}
else
Expand Down
Loading