Skip to content

Commit

Permalink
Common: Remove goto in MemArena.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-n committed Dec 1, 2014
1 parent e3abad2 commit a53c521
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Source/Core/Common/MemArena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,17 @@ static bool Memory_TryBase(u8 *base, MemoryView *views, int num_views, u32 flags
}

if (!view->view_ptr)
goto bail;
{
// Argh! ERROR! Free what we grabbed so far so we can try again.
MemoryMap_Shutdown(views, i+1, flags, arena);
return false;
}

if (view->out_ptr)
*(view->out_ptr) = (u8*) view->view_ptr;
}

return true;

bail:
// Argh! ERROR! Free what we grabbed so far so we can try again.
MemoryMap_Shutdown(views, i+1, flags, arena);
return false;
}

static u32 MemoryMap_InitializeViews(MemoryView *views, int num_views, u32 flags)
Expand Down

0 comments on commit a53c521

Please sign in to comment.