Commit 46fa9cbd authored by Jakob Bornecrantz's avatar Jakob Bornecrantz
Browse files

t/prober: Refactor closing down a bit

parent 0fa7af1d
......@@ -103,12 +103,22 @@ main(int argc, const char **argv)
}
printf("\tFound '%s'\n", xdevs[i]->name);
}
// End of program
printf(" :: All ok, shutting down.\n");
for (size_t i = 0; i < NUM_XDEVS; i++) {
if (xdevs[i] == NULL) {
continue;
}
printf("\tDestroying '%s'\n", xdevs[i]->name);
xdevs[i]->destroy(xdevs[i]);
xdevs[i] = NULL;
}
printf(" :: All ok, shutting down.\n");
// Finally done
return do_exit(&p, 0);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment