DB_ENV->mutex_free()
Prev | Chapter 9. Mutex Methods | Next

## DB_ENV->mutex_free()

    #include <db.h>

    int
    DB_ENV->mutex_free(DB_ENV *dbenv, db_mutex_t mutex);

The `DB_ENV->mutex_free()` method discards a mutex allocated by DB_ENV->mutex_alloc().

The `DB_ENV->mutex_free()` method may not be called before the DB_ENV->open() method is called.

The `DB_ENV->mutex_free()` method returns a non-zero error value on failure and 0 on success.

### Parameters

#### mutex

The mutex parameter is a mutex previously allocated by DB_ENV->mutex_alloc().

### Errors

The `DB_ENV->mutex_free()` method may fail and return one of the following non-zero errors:

#### EINVAL

An invalid flag value or parameter was specified.

### Class

DB_ENV

### See Also

Mutex Methods

Prev | Up | Next
DB_ENV->mutex_alloc() | Home | DB_ENV->mutex_get_align()