Commit f928e4d3 authored by Philippe Gerum's avatar Philippe Gerum

vxworks/memPartLib: do not account for failed alloc

parent f3333174
......@@ -156,6 +156,8 @@ void *memPartAlloc(PART_ID partId, unsigned int nBytes)
p = heapobj_alloc(&mp->hobj, nBytes);
if (p == NULL)
goto out;
mp->stats.numBytesAlloc += nBytes;
......@@ -163,7 +165,7 @@ void *memPartAlloc(PART_ID partId, unsigned int nBytes)
if (mp->stats.numBytesAlloc > mp->stats.maxBytesAlloc)
mp->stats.maxBytesAlloc = mp->stats.numBytesAlloc;
return p;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment