Bug 928186: fix nuwa process crash due to LibcAllocator not allocating enough memory. r=khuey

This commit is contained in:
Cervantes Yu 2013-10-17 17:00:00 +01:00
parent 1adfbb9aab
commit 14514506ea

View File

@ -101,7 +101,7 @@ struct LibcAllocator: public std::allocator<T>
allocate(typename std::allocator<T>::size_type n,
const void * = 0)
{
return reinterpret_cast<T *>(mMallocImpl(n));
return reinterpret_cast<T *>(mMallocImpl(sizeof(T) * n));
}
inline void