Reset controller::active_codec on uninit.
* The controller structure is static, so if you closed the device, and the driver failed to initialize correctly (ie. finds no codec) on the second try, it would have crashed accessing an already freed codec. * Not sure why it fails to detect any codecs on second open, yet, though.
This commit is contained in:
@@ -1049,4 +1049,5 @@ hda_hw_uninit(hda_controller* controller)
|
||||
if (controller->codecs[index] != NULL)
|
||||
hda_codec_delete(controller->codecs[index]);
|
||||
}
|
||||
controller->active_codec = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user