forked from Imagelibrary/rtems
Clean up error handling.
This commit is contained in:
@@ -923,6 +923,7 @@ NfsNode rval = nfsNodeCreate(node->nfs, 0);
|
||||
if (node->str) {
|
||||
rval->args.name = rval->str = strdup(node->str);
|
||||
if (!rval->str) {
|
||||
errno = ENOMEM;
|
||||
nfsNodeDestroy(rval);
|
||||
return 0;
|
||||
}
|
||||
@@ -1393,6 +1394,11 @@ unsigned long niu,siu;
|
||||
/* clone the node */
|
||||
if ( !node ) {
|
||||
/* nodeClone sets errno */
|
||||
pathloc->node_access = 0;
|
||||
if ( ! (e = errno) ) {
|
||||
/* if we have no node, e must not be zero! */
|
||||
e = ENOMEM;
|
||||
}
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user