Fixed a memory leak in sound/snd_ac97_codec.c.

This commit is contained in:
OBattler
2023-06-19 00:09:24 +02:00
parent 997a068c95
commit ef0c04ae3a

View File

@@ -587,6 +587,7 @@ ac97_codec_init(const device_t *info)
/* Associate this codec to the current controller. */
if (!ac97_codec || (ac97_codec_count <= 0)) {
pclog("AC97 Codec %d: No controller to associate codec\n", ac97_codec_id);
free(dev);
return NULL;
}
*ac97_codec = dev;