message: [SocketTest] Fix a nullptr dereference in the tests.
diff: @@ -57,10 +57,12 @@ protected:
  std::unique_ptr<SocketType> listen_socket_up(
  new SocketType(true, child_processes_inherit));
  std::string empty;
  - EXPECT_EQ(empty, std::string(error.AsCString("")));
  + const char *err = error.AsCString("");
  + EXPECT_EQ(empty, err ? std::string(err) : "");
  EXPECT_FALSE(error.Fail());
  error = listen_socket_up->Listen(listen_remote_address, 5);
  - EXPECT_EQ(empty, std::string(error.AsCString("")));
  + err = error.AsCString("");
  + EXPECT_EQ(empty, err ? std::string(err) : "");
  EXPECT_FALSE(error.Fail());
  EXPECT_TRUE(listen_socket_up->IsValid());
  @@ -73,24 +75,30 @@ protected:
  std::string connect_remote_address = get_connect_addr(*listen_socket_up);
  std::unique_ptr<SocketType> connect_socket_up(
  new SocketType(true, child_processes_inherit));
  - EXPECT_EQ(empty, std::string(error.AsCString("")));
  + err = error.AsCString("");
  + EXPECT_EQ(empty, err ? std::string(err) : "");
  EXPECT_FALSE(error.Fail());
  error = connect_socket_up->Connect(connect_remote_address);
  - EXPECT_EQ(empty, std::string(error.AsCString("")));
  + err = error.AsCString("");
  + EXPECT_EQ(empty, err ? std::string(err) : "");
  EXPECT_FALSE(error.Fail());
  EXPECT_TRUE(connect_socket_up->IsValid());
  a_up->swap(connect_socket_up);
  - EXPECT_EQ(empty, std::string(error.AsCString("")));
  + err = error.AsCString("");
  + EXPECT_EQ(empty, err ? std::string(err) : "");
  EXPECT_TRUE(error.Success());
  - EXPECT_EQ(empty, std::string(error.AsCString("")));
  + err = error.AsCString("");
  + EXPECT_EQ(empty, err ? std::string(err) : "");
  EXPECT_TRUE((*a_up)->IsValid());
  accept_thread.join();
  b_up->reset(static_cast<SocketType *>(accept_socket));
  - EXPECT_EQ(empty, std::string(error.AsCString("")));
  + err = error.AsCString("");
  + EXPECT_EQ(empty, err ? std::string(err) : "");
  EXPECT_TRUE(accept_error.Success());
  - EXPECT_EQ(empty, std::string(error.AsCString("")));
  + err = error.AsCString("");
  + EXPECT_EQ(empty, err ? std::string(err) : "");
  EXPECT_TRUE((*b_up)->IsValid());
  listen_socket_up.reset();
  