hal: call ACDB deinit when init fails
When ACDB initialization fails the deallocation should be called in order to free up any resources created during init. Change-Id: I6220ea241361f1bb46b83c9b30087af8d663d6ac
This commit is contained in:
parent
15fa15d8ac
commit
022bbd1419
|
@ -2533,6 +2533,8 @@ void *platform_init(struct audio_device *adev)
|
|||
} else {
|
||||
my_data->is_acdb_initialized = false;
|
||||
ALOGD("ACDB initialization failed");
|
||||
if (my_data->acdb_deallocate)
|
||||
my_data->acdb_deallocate();
|
||||
}
|
||||
}
|
||||
audio_extn_pm_vote();
|
||||
|
|
|
@ -3408,6 +3408,8 @@ void *platform_init(struct audio_device *adev)
|
|||
} else {
|
||||
my_data->is_acdb_initialized = false;
|
||||
ALOGD("ACDB initialization failed");
|
||||
if (my_data->acdb_deallocate)
|
||||
my_data->acdb_deallocate();
|
||||
}
|
||||
}
|
||||
/* init keep-alive for compress passthru */
|
||||
|
|
Loading…
Reference in New Issue