MidiSettings: Don't leak settings in failure case.
CID 1422944.
This commit is contained in:
parent
d692d22c9d
commit
a20f4f8a85
@ -37,8 +37,10 @@ read_midi_settings(struct midi_settings* settings)
|
||||
|
||||
const char* soundfont = get_driver_parameter(handle, "soundfont", NULL,
|
||||
NULL);
|
||||
if (soundfont == NULL)
|
||||
if (soundfont == NULL) {
|
||||
unload_driver_settings(handle);
|
||||
return B_ERROR;
|
||||
}
|
||||
strlcpy(settings->soundfont_file, soundfont,
|
||||
sizeof(settings->soundfont_file));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user