@@ -89,10 +89,12 @@ /* * Send the reply back to the requestor, hopefully they are waiting for this message */ PostMessage(*reply); + delete message; + return; } virtual void HandleMessage(const pp::Var& messagePlain) { pp::VarDictionary *message; @@ -100,10 +102,12 @@ /* * The incoming message must be a dictionary */ if (!messagePlain.is_dictionary()) { + pcscNaClHandleMessage(messagePlain); + return; } /* * Process the appropriate command from the incoming message @@ -112,22 +116,34 @@ /* * Verify that this message is destined for us */ if (!message->HasKey("target")) { + delete message; + + pcscNaClHandleMessage(messagePlain); + return; } target = message->Get("target"); if (target.AsString() != "cackey") { + delete message; + + pcscNaClHandleMessage(messagePlain); + return; } /* * Determine what we are being asked to do */ if (!message->HasKey("command")) { + delete message; + + pcscNaClHandleMessage(messagePlain); + return; } /* * Process the request in another thread