Fix unchecked calls to asprintf
[openafs.git] / src / ptserver / ptutils.c
index df8caf0..7d0ca1e 100644 (file)
@@ -409,7 +409,8 @@ CreateEntry(struct ubik_trans *at, char aname[PR_MAXNAMELEN], afs_int32 *aid, af
        /* To create the user <name>@<cell> the group AUTHUSER_GROUP@<cell>
         * must exist.
         */
-       asprintf(&cellGroup, "%s%s", AUTHUSER_GROUP, atsign);
+       if (asprintf(&cellGroup, "%s%s", AUTHUSER_GROUP, atsign) < 0)
+           return PRNOMEM;
        pos = FindByName(at, cellGroup, &centry);
        free(cellGroup);
        if (!pos)