Fix V668 PVS Studio - deal with pointer and NULL
[novacoin.git] / src / util.cpp
index f6d80f7..7fb43bc 100644 (file)
@@ -331,7 +331,7 @@ string vstrprintf(const char *format, va_list ap)
         if (p != buffer)
             delete[] p;
         limit *= 2;
-        p = new char[limit];
+        p = new(nothrow) char[limit];
         if (p == NULL)
             throw std::bad_alloc();
     }