ladspa plugin - SIGSEGV fix when label is not specified

This commit is contained in:
Jaroslav Kysela 2005-12-13 14:25:13 +00:00
parent 1f231e2e1a
commit aa21cf4d7c

View file

@ -1100,6 +1100,7 @@ static int snd_pcm_ladspa_check_file(snd_pcm_ladspa_plugin_t * const plugin,
#else #else
char *labellocale; char *labellocale;
struct lconv *lc; struct lconv *lc;
if (label != NULL) {
lc = localeconv (); lc = localeconv ();
labellocale = malloc (strlen (label) + 1); labellocale = malloc (strlen (label) + 1);
if (labellocale == NULL) if (labellocale == NULL)
@ -1112,6 +1113,7 @@ static int snd_pcm_ladspa_check_file(snd_pcm_ladspa_plugin_t * const plugin,
continue; continue;
} }
free (labellocale); free (labellocale);
}
#endif #endif
if (ladspa_id > 0 && d->UniqueID != ladspa_id) if (ladspa_id > 0 && d->UniqueID != ladspa_id)
continue; continue;