return code;
}
-afs_int32
+static afs_int32
VolPartitionInfo(struct rx_call *acid, char *pname, struct diskPartition64
*partition)
{
{
transDebugInfo *pntr;
afs_int32 allocSize = 50;
+ afs_int32 code = 0;
struct volser_trans *tt, *nt, *allTrans;
if (!afsconf_CheckRestrictedQuery(tdir, acid, restrictedQueryLevel))
allocSize = (allocSize * 3) / 2;
pntr = realloc(transInfo->transDebugEntries_val,
allocSize * sizeof(transDebugInfo));
+ if (pntr == NULL) {
+ code = ENOMEM;
+ goto done;
+ }
transInfo->transDebugEntries_val = pntr;
pntr =
transInfo->transDebugEntries_val +
done:
VTRANS_UNLOCK;
- return 0;
+ return code;
}
afs_int32
#endif
ttc = NewTrans(volumeId, partId);
if (!ttc) {
- return VOLSERVOLBUSY;
+ ret = VOLSERVOLBUSY;
+ goto done;
}
#ifdef AFS_NAMEI_ENV
ret = namei_ConvertROtoRWvolume(pname, volumeId);
break;
}
}
-
+ done:
if (ttc)
DeleteTrans(ttc, 1);