nfs4: Fix CID #991493: Release memory when returing an error code

This commit is contained in:
Pawel Dziepak 2013-06-13 11:38:44 +02:00
parent d94b1808ec
commit 631ceff294
1 changed files with 4 additions and 2 deletions

View File

@ -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;