cbtable: don't dereference memory that was previously unmapped

The backing store for 'head' was being unmapped prior to
dereferencing the variable. Don't do that, and calculate
the new mapping size prior to unmapping the previous table.

BUG=chromium:773801
BRANCH=none
TEST=Ran on parrot and didn't segfault.

Change-Id: Ic91345b8be50a73d498deba8269dc9e7112d12ee
Signed-off-by: Aaron Durbin <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/714396
Reviewed-by: Furquan Shaikh <[email protected]>
Reviewed-by: Mike Frysinger <[email protected]>
1 file changed