[cmem] Allow delete_memsuper on null memsuper

While not done for freeing cmem blocks, it helps clean up shutdown code
when the memsuper may not have been created.
This commit is contained in:
Bill Currie 2024-02-01 22:00:26 +09:00
parent 999f878b76
commit a50eaab1e6

View file

@ -413,6 +413,9 @@ new_memsuper (void)
void
delete_memsuper (memsuper_t *super)
{
if (!super) {
return;
}
// The block holding the superblock is always the last block in the list
while (super->memblocks && super->memblocks->next) {
memblock_t *t = super->memblocks;