Commit 3b652629 authored by Johny Mattsson's avatar Johny Mattsson
Browse files

Less memory leaks if not coding in a rush...

parent 1f073e8b
......@@ -76,7 +76,7 @@ bool platform_partition_add (const platform_partition_t *info)
esp_err_t err =
spi_flash_read (PARTITION_ADD, (uint32_t *)part_table, SPI_FLASH_SEC_SIZE);
if (err != ESP_OK)
return false;
goto out;
uint8_t idx = 0;
for (; possible_idx (idx); ++idx)
......@@ -99,6 +99,7 @@ bool platform_partition_add (const platform_partition_t *info)
PARTITION_ADD, (uint32_t *)part_table, SPI_FLASH_SEC_SIZE);
}
out:
free (part_table);
return err == ESP_OK;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment