smalloc: alloc failure cleanups

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/gettime-thread.c b/gettime-thread.c
index da40904..c1b4b09 100644
--- a/gettime-thread.c
+++ b/gettime-thread.c
@@ -14,12 +14,14 @@
 void fio_gtod_init(void)
 {
 	fio_tv = smalloc(sizeof(struct timeval));
-	assert(fio_tv);
+	if (!fio_tv)
+		log_err("fio: smalloc pool exhausted\n");
 }
 
 static void fio_gtod_update(void)
 {
-	gettimeofday(fio_tv, NULL);
+	if (fio_tv)
+		gettimeofday(fio_tv, NULL);
 }
 
 static void *gtod_thread_main(void *data)