engines: don't use printf or stderr directly
[fio.git] / engines / rbd.c
index 32ce60cfed4fb30239b6750bd91bd8b27bfaa2ee..6fe87b8d010cc6bd1161655fb1e7684528406ebc 100644 (file)
@@ -86,6 +86,8 @@ static int _fio_setup_rbd_data(struct thread_data *td,
        return 0;
 
 failed:
+       if (rbd_data)
+               free(rbd_data);
        return 1;
 
 }
@@ -220,7 +222,7 @@ static struct io_u *fio_rbd_event(struct thread_data *td, int event)
 }
 
 static int fio_rbd_getevents(struct thread_data *td, unsigned int min,
-                            unsigned int max, struct timespec *t)
+                            unsigned int max, const struct timespec *t)
 {
        struct rbd_data *rbd_data = td->io_ops->data;
        unsigned int events = 0;