Skip to content

Commit

Permalink
audio: Fix debugging message
Browse files Browse the repository at this point in the history
  • Loading branch information
sthibaul committed Mar 8, 2025
1 parent 038dc8f commit 0012caa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/spd_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,14 @@ AudioID *spd_audio_open(const char *name, void **pars, char **error)
libname = g_strdup_printf("%s/" SPD_AUDIO_LIB_PREFIX "%s.so", plugin_dir, name);
dlhandle = dlopen(libname, RTLD_NOW | RTLD_GLOBAL);

g_free(libname);
if (NULL == dlhandle) {
*error =
(char *)g_strdup_printf("Cannot open plugin %s at %s. error: %s",
name, libname, dlerror());
g_free(libname);
return (AudioID *) NULL;
}
g_free(libname);

fn = dlsym(dlhandle, SPD_AUDIO_PLUGIN_ENTRY_STR);
#else
Expand All @@ -145,6 +146,7 @@ AudioID *spd_audio_open(const char *name, void **pars, char **error)
*error =
(char *)g_strdup_printf("Cannot open plugin %s in %s/%s. error: %s",
name, plugin_dir, libname, lt_dlerror());
g_free(libname);
return (AudioID *) NULL;
}
g_free(libname);
Expand Down

0 comments on commit 0012caa

Please sign in to comment.