aboutsummaryrefslogtreecommitdiffstats
path: root/libibex/ibex_block.c
diff options
context:
space:
mode:
Diffstat (limited to 'libibex/ibex_block.c')
-rw-r--r--libibex/ibex_block.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libibex/ibex_block.c b/libibex/ibex_block.c
index a6f810d4ae..054a8791cf 100644
--- a/libibex/ibex_block.c
+++ b/libibex/ibex_block.c
@@ -358,7 +358,7 @@ ibex *ibex_open (char *file, int flags, int mode)
ib->mode = mode;
#ifdef ENABLE_THREADS
- ib->lock = g_mutex_new();
+ pthread_mutex_init(&ib->lock, NULL);
#endif
IBEX_LIST_LOCK(ib);
@@ -481,8 +481,9 @@ int ibex_close (ibex *ib)
g_free(ib->name);
#ifdef ENABLE_THREADS
- g_mutex_free(ib->lock);
+ pthread_mutex_destroy(&ib->lock);
#endif
+
g_free(ib);
return ret;