]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Make sure we have enough memory to allocate the return list.
authorNickolai Zeldovich <kolya@mit.edu>
Sat, 23 Feb 2002 09:38:11 +0000 (09:38 +0000)
committerNickolai Zeldovich <kolya@mit.edu>
Sat, 23 Feb 2002 09:38:11 +0000 (09:38 +0000)
src/ptserver/ptprocs.c

index a102910e2be6bb6060f537812ce95e0ca5a0f139..faa0864ddbc8170f98dede3301524a8ecb7621bd 100644 (file)
@@ -527,6 +527,7 @@ afs_int32 idToName (call, aid, aname)
     if (size <= 0) size = 0;
     aname->namelist_val = (prname *)malloc(size*PR_MAXNAMELEN);
     aname->namelist_len = 0;
+    if (aname->namelist_val == 0) return PRNOMEM;
     if (aid->idlist_len == 0) return 0;
     if (size == 0) return PRTOOMANY;   /* rxgen will probably handle this */