Index: build/chrome/cackey-chrome-init.cc ================================================================== --- build/chrome/cackey-chrome-init.cc +++ build/chrome/cackey-chrome-init.cc @@ -39,11 +39,10 @@ struct cackey_certificate *certificates, incomingCertificateCACKey; pp::VarDictionary *reply; pp::VarArray certificatesPPArray; pp::VarArrayBuffer *certificateContents, *incomingCertificateContents, *incomingData, *outgoingData; pp::Var command; - const pp::Var *outgoingDataAsVar = NULL; int numCertificates, i; unsigned long outgoingDataLength; /* * Extract the command @@ -128,16 +127,14 @@ memcpy(outgoingData->Map(), buffer, outgoingDataLength); outgoingData->Unmap(); - outgoingDataAsVar = new pp::Var(outgoingData->pp_var()); - - delete outgoingData; - reply->Set("status", "success"); - reply->Set("signedData", outgoingDataAsVar); + reply->Set("signedData", *outgoingData); + + delete outgoingData; break; case CACKEY_CHROME_ERROR: reply->Set("status", "error"); reply->Set("error", "Unable to sign data"); @@ -182,14 +179,10 @@ delete message; delete messagePlain; - if (outgoingDataAsVar) { - delete outgoingDataAsVar; - } - return; } virtual void HandleMessage(const pp::Var& messagePlain) { pp::VarDictionary *message;