Skip to content

Commit

Permalink
Don't need to destroy mutex if we were built without pthreads
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Oct 18, 2015
1 parent c36f8fd commit 1f9ac6c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ void fr_state_free(fr_state_t *state)

rbtree_free(my_tree);
PTHREAD_MUTEX_UNLOCK(&state->mutex);
#ifdef HAVE_PTHREAD_H
if (main_config.spawn_workers) pthread_mutex_destroy(&state->mutex);
#endif

if (state == global_state) global_state = NULL;
}
Expand Down

0 comments on commit 1f9ac6c

Please sign in to comment.