Commit e7905855 authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka
Browse files

vxworks/mempart: fix error status upon failure to create partition

Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent 903b21fe
......@@ -48,17 +48,21 @@ PART_ID memPartCreate(char *pPool, unsigned int poolSize)
pthread_mutexattr_t mattr;
struct wind_mempart *mp;
struct service svc;
int ret;
mp = xnmalloc(sizeof(*mp));
if (mp == NULL)
if (mp == NULL) {
errno = S_memLib_NOT_ENOUGH_MEMORY;
goto fail;
if (__heapobj_init(&mp->hobj, NULL, poolSize, pPool)) {
ret = __heapobj_init(&mp->hobj, NULL, poolSize, pPool);
if (ret) {
errno = S_memLib_INVALID_NBYTES;
errno = S_memLib_NOT_ENOUGH_MEMORY;
return (PART_ID)0;
Supports Markdown
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