| Index: ppapi/cpp/websocket.cc
|
| diff --git a/ppapi/cpp/websocket.cc b/ppapi/cpp/websocket.cc
|
| index f0ae5fa0c30075ddef20cfc14a2f0b65983b0833..afd1310f072c58324dbba1d3a944d33ac35d2ba4 100644
|
| --- a/ppapi/cpp/websocket.cc
|
| +++ b/ppapi/cpp/websocket.cc
|
| @@ -39,11 +39,8 @@ int32_t WebSocket::Connect(const Var& url, const Var protocols[],
|
|
|
| // Convert protocols to C interface.
|
| PP_Var *c_protocols = NULL;
|
| - if (protocol_count) {
|
| + if (protocol_count)
|
| c_protocols = new PP_Var[protocol_count];
|
| - if (!c_protocols)
|
| - return PP_ERROR_NOMEMORY;
|
| - }
|
| for (uint32_t i = 0; i < protocol_count; ++i)
|
| c_protocols[i] = protocols[i].pp_var();
|
|
|
|
|