libsel4utils: Delete all caps in process cspace A process may have created more caps than what it was created with.
diff --git a/libsel4utils/src/process.c b/libsel4utils/src/process.c index 6b22a20..42841cd 100644 --- a/libsel4utils/src/process.c +++ b/libsel4utils/src/process.c
@@ -698,7 +698,7 @@ sel4utils_destroy_process(sel4utils_process_t *process, vka_t *vka) { /* delete all of the caps in the cspace */ - for (int i = 1; i < process->cspace_next_free; i++) { + for (int i = 1; i < BIT(CONFIG_SEL4UTILS_CSPACE_SIZE_BITS);i++){ cspacepath_t path; path.root = process->cspace.cptr; path.capPtr = i;