Commit
048368ef6 ("MINOR: deinit: always deinit the init_mutex on
failed initialization") added the missing unlock but forgot to
condition it on USE_THREAD, resulting in a build failure. No
backport is needed.
This addresses oss-fuzz issue 36426.
list_for_each_entry(ptaf, &per_thread_alloc_list, list) {
if (!ptaf->fct()) {
ha_alert("failed to allocate resources for thread %u.\n", tid);
+#ifdef USE_THREAD
pthread_mutex_unlock(&init_mutex);
+#endif
exit(1);
}
}
list_for_each_entry(ptif, &per_thread_init_list, list) {
if (!ptif->fct()) {
ha_alert("failed to initialize thread %u.\n", tid);
+#ifdef USE_THREAD
pthread_mutex_unlock(&init_mutex);
+#endif
exit(1);
}
}