audio: close dlopen'ed library on error

Close dlopen'ed perf library on error

Change-Id: I70e4cd95e97ffac116f83d1949f4dbe78d8f944d
CRs-Fixed: 2047997
diff --git a/hal/audio_extn/audio_extn.c b/hal/audio_extn/audio_extn.c
index 804027b..072444e 100644
--- a/hal/audio_extn/audio_extn.c
+++ b/hal/audio_extn/audio_extn.c
@@ -1161,6 +1161,7 @@
                                                        "perf_lock_acq");
             if (perf_lock_acq == NULL) {
                 ALOGE("%s: Perf lock Acquire NULL \n", __func__);
+                dlclose(qcopt_handle);
                 ret = -EINVAL;
                 goto err;
             }
@@ -1168,6 +1169,7 @@
                                                        "perf_lock_rel");
             if (perf_lock_rel == NULL) {
                 ALOGE("%s: Perf lock Release NULL \n", __func__);
+                dlclose(qcopt_handle);
                 ret = -EINVAL;
                 goto err;
             }