Various fixes/updates
[fio.git] / mutex.c
diff --git a/mutex.c b/mutex.c
index 88044f3a818753feb374bc0370e545fb2095d248..e33e7cc8f2611a42256e72a3bceddf9e7560b1ef 100644 (file)
--- a/mutex.c
+++ b/mutex.c
@@ -34,11 +34,7 @@ struct fio_mutex *fio_mutex_init(int value)
        }
 
 #ifdef FIO_HAVE_FALLOCATE
-       ret = posix_fallocate(fd, 0, sizeof(struct fio_mutex));
-       if (ret > 0) {
-               fprintf(stderr, "posix_fallocate mutex failed: %s\n", strerror(ret));
-               goto err;
-       }
+       posix_fallocate(fd, 0, sizeof(struct fio_mutex));
 #endif
 
        if (ftruncate(fd, sizeof(struct fio_mutex)) < 0) {
@@ -93,6 +89,9 @@ struct fio_mutex *fio_mutex_init(int value)
                goto err;
        }
 
+       pthread_condattr_destroy(&cond);
+       pthread_mutexattr_destroy(&attr);
+
        return mutex;
 err:
        if (mutex)