summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2022-09-29 05:50:15 -0700
committerLinux Build Service Account <lnxbuild@localhost>2022-09-29 05:50:15 -0700
commite565492cab4bd1f5ed5c2382fc5eb1f9f078e097 (patch)
tree597a881073ede781c6856988b5b8e345e809d23c
parentc7c0c4fae8c81adb8bc3791e215bc797d6b007a4 (diff)
parent18384ed05fa19dd0f9acb3b2822dc299b227b926 (diff)
Merge 18384ed05fa19dd0f9acb3b2822dc299b227b926 on remote branch
Change-Id: I38730224ccf29677a0c2bd62b67b6b26f9ba83fe
-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: