#if TEST_OOM
if (virAllocTestFail()) {
*(void **)ptrptr = NULL;
+ if (report)
+ virReportOOMErrorFull(domcode, filename, funcname, linenr);
+ errno = ENOMEM;
return -1;
}
#endif
#if TEST_OOM
if (virAllocTestFail()) {
*(void **)ptrptr = NULL;
+ if (report)
+ virReportOOMErrorFull(domcode, filename, funcname, linenr);
+ errno = ENOMEM;
return -1;
}
#endif
{
void *tmp;
#if TEST_OOM
- if (virAllocTestFail())
+ if (virAllocTestFail()) {
+ if (report)
+ virReportOOMErrorFull(domcode, filename, funcname, linenr);
+ errno = ENOMEM;
return -1;
+ }
#endif
if (xalloc_oversized(count, size)) {
size_t alloc_size = 0;
#if TEST_OOM
- if (virAllocTestFail())
+ if (virAllocTestFail()) {
+ if (report)
+ virReportOOMErrorFull(domcode, filename, funcname, linenr);
+ errno = ENOMEM;
return -1;
+ }
#endif
if (VIR_ALLOC_VAR_OVERSIZED(struct_size, count, element_size)) {