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) {
|
if (node->str) {
|
||||||
rval->args.name = rval->str = strdup(node->str);
|
rval->args.name = rval->str = strdup(node->str);
|
||||||
if (!rval->str) {
|
if (!rval->str) {
|
||||||
|
errno = ENOMEM;
|
||||||
nfsNodeDestroy(rval);
|
nfsNodeDestroy(rval);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1393,6 +1394,11 @@ unsigned long niu,siu;
|
|||||||
/* clone the node */
|
/* clone the node */
|
||||||
if ( !node ) {
|
if ( !node ) {
|
||||||
/* nodeClone sets errno */
|
/* nodeClone sets errno */
|
||||||
|
pathloc->node_access = 0;
|
||||||
|
if ( ! (e = errno) ) {
|
||||||
|
/* if we have no node, e must not be zero! */
|
||||||
|
e = ENOMEM;
|
||||||
|
}
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user