Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02ab1198 authored by Ben Romberger's avatar Ben Romberger Committed by Gerrit - the friendly Code Review server
Browse files

hal: Properly initialize pthread mutex

Use proper initialization flag for pthread
mutex. If not used the lock and unlock
will be called on what is believed to be
a destroyed mutex causing a segmentation
fault.

Change-Id: I86425dca40e3372d87d979e84f82af660e12dab2
CRs-Fixed: 2246632
parent b6d52cc7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -437,7 +437,7 @@ static const struct string_to_enum out_sample_rates_name_to_enum_table[] = {
};

static struct audio_device *adev = NULL;
static pthread_mutex_t adev_init_lock;
static pthread_mutex_t adev_init_lock = PTHREAD_MUTEX_INITIALIZER;
static unsigned int audio_device_ref_count;
//cache last MBDRC cal step level
static int last_known_cal_step = -1 ;