Merge "audio: close dlopen'ed library on error" into oc-mr1-dev am: b85966c0a3
am: 6314de48f4
Change-Id: I39bbeb26358371b77ed49662bea830373a8624fb
diff --git a/hal/audio_extn/audio_extn.c b/hal/audio_extn/audio_extn.c
index e5d7db4..4edbf9b 100644
--- a/hal/audio_extn/audio_extn.c
+++ b/hal/audio_extn/audio_extn.c
@@ -118,6 +118,8 @@
"perf_lock_acq");
if (perf_lock_acq == NULL) {
ALOGE("%s: Perf lock Acquire NULL", __func__);
+ dlclose(qcopt_handle);
+ qcopt_handle = NULL;
ret = -EINVAL;
goto err;
}
@@ -125,6 +127,8 @@
"perf_lock_rel");
if (perf_lock_rel == NULL) {
ALOGE("%s: Perf lock Release NULL", __func__);
+ dlclose(qcopt_handle);
+ qcopt_handle = NULL;
ret = -EINVAL;
goto err;
}