diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index e7df09b911..89ccfdf06d 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -1409,6 +1409,9 @@ DECL_PIOCTL(PSetTokens) afs_osi_Free(tu->stp, tu->stLen); } tu->stp = (char *)afs_osi_Alloc(stLen); + if (tu->stp == NULL) { + return ENOMEM; + } tu->stLen = stLen; memcpy(tu->stp, stp, stLen); tu->ct = clear;