Fix rare ATRAC9 memleak

This commit is contained in:
bnnm 2018-08-11 17:54:08 +02:00
parent 999743b4e5
commit 9e0c4ebd3d

View File

@ -11,6 +11,7 @@ atrac9_codec_data *init_atrac9(atrac9_config *cfg) {
atrac9_codec_data *data = NULL;
data = calloc(1, sizeof(atrac9_codec_data));
if (!data) goto fail;
data->handle = Atrac9GetHandle();
if (!data->handle) goto fail;
@ -41,6 +42,7 @@ atrac9_codec_data *init_atrac9(atrac9_config *cfg) {
return data;
fail:
free_atrac9(data);
return NULL;
}