nfs4: Fix CID #991493: Release memory when returing an error code
This commit is contained in:
parent
d94b1808ec
commit
631ceff294
@ -205,10 +205,12 @@ RootInode::GetLocations(AttrValue** attrv)
|
||||
result = reply.GetAttr(attrv, &count);
|
||||
if (result != B_OK)
|
||||
return result;
|
||||
if (count < 1)
|
||||
if (count < 1) {
|
||||
delete *attrv;
|
||||
return B_ERROR;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
return B_OK;
|
||||
} while (true);
|
||||
|
||||
return B_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user