summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-10-11 22:18:22 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-10-11 22:18:22 +0000
commit23562725bd0680c2bb4717110d4ea86dc178499a (patch)
tree09996aef169a136a2cf138f43cac4962503ed24e
parentaf85fef8ac760c7d26815c10e86b2daa4340da5e (diff)
parent6b9b7e9b2aec75ee30d8efe5937449a912ee8546 (diff)
Snap for 9162390 from 6b9b7e9b2aec75ee30d8efe5937449a912ee8546 to u-keystone-qcom-release
Change-Id: Icdc71667517ab50233119446d758656f597494ca
-rw-r--r--compress_plugin.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/compress_plugin.c b/compress_plugin.c
index 22f8f11..ac54f6c 100644
--- a/compress_plugin.c
+++ b/compress_plugin.c
@@ -384,17 +384,18 @@ static int compress_plug_open(unsigned int card, unsigned int device,
strlcat(open_fn, "_open", open_fn_size);
plug_data->plugin_open_fn = dlsym(dl_hdl, open_fn);
+ free(open_fn);
if (!plug_data->plugin_open_fn) {
fprintf(stderr, "%s: dlsym to open fn failed, err = '%s'\n",
__func__, dlerror());
- goto err_dlsym;
+ goto err_open_fn;
}
rc = plug_data->plugin_open_fn(&plug_data->plugin,
card, device, flags);
if (rc) {
fprintf(stderr, "%s: failed to open plugin\n", __func__);
- goto err_dlsym;
+ goto err_open_fn;
}
/* Call snd-card-def to get card and compress nodes */
@@ -412,8 +413,6 @@ static int compress_plug_open(unsigned int card, unsigned int device,
return 0;
-err_dlsym:
- free(open_fn);
err_open_fn:
dlclose(dl_hdl);
err_get_lib: