The pointer returned by operator new can't be null
Change-Id: I13f4004f3fc4743a83be2351a2c3b7b6ef2df4d5
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
*/
#include "file_storage_impl.h"
+#include <new>
FileStorage::FileStorage(const IString_Provider* string_provider):
m_storage(NULL),
fclose(fp);
return -1;
}
- m_storage = new char[size];
+ m_storage = new(std::nothrow) char[size];
if (m_storage == NULL) {
fclose(fp);
return -1;
delete[] m_storage;
}
- m_storage = new char[block_size];
+ m_storage = new(std::nothrow) char[block_size];
if (m_storage == NULL) {
return -1;
}