Fix potential Null pointer dereference in test-time.c (#1681) * Fix potential Null pointer dereference in test-time.c * add err path * code review: free events before base --------- Co-authored-by: icy17 <1061499390@qq.com>