output/winmm: use delete instead of g_free()
This commit is contained in:
parent
84d20d9e43
commit
77429b6dd3
@ -112,14 +112,14 @@ winmm_output_init(const config_param ¶m, Error &error)
|
|||||||
{
|
{
|
||||||
WinmmOutput *wo = new WinmmOutput();
|
WinmmOutput *wo = new WinmmOutput();
|
||||||
if (!ao_base_init(&wo->base, &winmm_output_plugin, param, error)) {
|
if (!ao_base_init(&wo->base, &winmm_output_plugin, param, error)) {
|
||||||
g_free(wo);
|
delete wo;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *device = param.GetBlockValue("device");
|
const char *device = param.GetBlockValue("device");
|
||||||
if (!get_device_id(device, &wo->device_id, error)) {
|
if (!get_device_id(device, &wo->device_id, error)) {
|
||||||
ao_base_finish(&wo->base);
|
ao_base_finish(&wo->base);
|
||||||
g_free(wo);
|
delete wo;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user