if (key != NULL && key->subkeys != NULL) {
subkeys = malloc((spsize(key->subkeys) + 1) *
sizeof (uint64_t));
cursubkey = key->subkeys;
while (cursubkey != NULL) {
if (key != NULL && key->subkeys != NULL) {
subkeys = malloc((spsize(key->subkeys) + 1) *
sizeof (uint64_t));
cursubkey = key->subkeys;
while (cursubkey != NULL) {