diff --git a/extensions/webservices/soap/src/nsDefaultSOAPEncoder.cpp b/extensions/webservices/soap/src/nsDefaultSOAPEncoder.cpp index d0b1c221f90..c436b14ad6f 100644 --- a/extensions/webservices/soap/src/nsDefaultSOAPEncoder.cpp +++ b/extensions/webservices/soap/src/nsDefaultSOAPEncoder.cpp @@ -2160,6 +2160,9 @@ static nsresult DecodeStructParticle(nsISOAPEncoding* aEncoding, nsIDOMElement* PRUint32 i; if (compositor == nsISchemaModelGroup::COMPOSITOR_ALL) { // This handles out-of-order appearances. nsCOMPtr all = new nsSupportsArray(); // Create something we can mutate + if (!all) + return NS_ERROR_OUT_OF_MEMORY; + all->SizeTo(particleCount); nsCOMPtr child; PRBool mangled = PR_FALSE;