Missed two frees, when swapping out for deletes
This commit is contained in:
parent
26d4bea1f1
commit
dd7cf4af10
|
@ -812,10 +812,10 @@ void GBCart::save_gb_cart(struct gb_cart* gb_cart)
|
|||
void GBCart::release_gb_cart(struct gb_cart* gb_cart)
|
||||
{
|
||||
if (gb_cart->rom != NULL)
|
||||
free(gb_cart->rom);
|
||||
delete gb_cart->rom;
|
||||
|
||||
if (gb_cart->ram != NULL)
|
||||
free(gb_cart->ram);
|
||||
delete gb_cart->ram;
|
||||
|
||||
memset(gb_cart, 0, sizeof(*gb_cart));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue