Missed two frees, when swapping out for deletes

This commit is contained in:
Emmet Young 2016-02-03 13:42:06 +11:00
parent 26d4bea1f1
commit dd7cf4af10
1 changed files with 2 additions and 2 deletions

View File

@ -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));
}