[chromeos] Fix null-dereference in GetGeolocationFromResponse()
SimpleURLLoader does not return the response body by default for most of error situations. The failing code was unconditionally dereferencing the std::unique_ptr<std::string<>> holding the response body and so, causing a crash. Bots didn't complain when the CL landed because apparently log levels greater than 0 are filtered out for unit tests (the line crashing was a VLOG(1)). That's why an unit test is not provided. Bug: 876627 Change-Id: Ibbc87955343fbab069cbc90b926593ffe6568ecd Reviewed-on: https://chromium-review.googlesource.com/1196888Reviewed-by:Matt Menke <mmenke@chromium.org> Reviewed-by:
Alexander Alekseev <alemate@chromium.org> Commit-Queue: Sergio Villar <svillar@igalia.com> Cr-Commit-Position: refs/heads/master@{#587961}
Showing
Please register or sign in to comment