Validate memory return.

If the cleanup after a process is done twice (or more) in parallel
then a race may cause the type to change between the iteration and
the conversion to a memory address, resulting in a nullptr crash when
it tries to extract the owning process ID below.

Note that multiple cleanups is itself not desired behavior (i.e. a bug)
but it shouldn't be fatal.

Bug: 777409
Change-Id: I1759eaa406cbea13b6a1f7f606a09a9426bbe3ac
Reviewed-on: https://chromium-review.googlesource.com/733871
Commit-Queue: Brian White <bcwhite@chromium.org>
Reviewed-by: Sigurður Ásgeirsson <siggi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511102}

CrOS-Libchrome-Original-Commit: 140c68eef1492d894ba12905ef047ce6c0625d55
1 file changed
tree: 37a4c1b07d767566499ba0df64dc4ecac6b5d600
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/