From 7d1f3c102efb9b6d94def351b451d18bfd60e73e Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 4 Feb 2024 17:49:41 +0100 Subject: [PATCH] Contaq 82x59x: Only delete the SMRAM structs on the 597. --- src/chipset/contaq_82c59x.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/chipset/contaq_82c59x.c b/src/chipset/contaq_82c59x.c index ec7050b1e..5c2910227 100644 --- a/src/chipset/contaq_82c59x.c +++ b/src/chipset/contaq_82c59x.c @@ -311,8 +311,10 @@ contaq_82c59x_close(void *priv) { contaq_82c59x_t *dev = (contaq_82c59x_t *) priv; - smram_del(dev->smram[1]); - smram_del(dev->smram[0]); + if (dev->green) { + smram_del(dev->smram[1]); + smram_del(dev->smram[0]); + } free(dev); }