diff options
Diffstat (limited to 'src/flash/nor/stellaris.c')
-rw-r--r-- | src/flash/nor/stellaris.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/flash/nor/stellaris.c b/src/flash/nor/stellaris.c index 38374ffe..f7e2e8d9 100644 --- a/src/flash/nor/stellaris.c +++ b/src/flash/nor/stellaris.c @@ -1065,6 +1065,12 @@ static int stellaris_probe(struct flash_bank *bank) if (retval != ERROR_OK) return retval; + if (bank->sectors) + { + free(bank->sectors); + bank->sectors = NULL; + } + /* provide this for the benefit of the NOR flash framework */ bank->size = 1024 * stellaris_info->num_pages; bank->num_sectors = stellaris_info->num_pages; |