Fix segfault caused by unitialized timeval pointer.