Fix segfault in test-reset.c