diff --git a/bin/pax/cache.c b/bin/pax/cache.c index 9ae4d8994df7..b95c8b51fd3a 100644 --- a/bin/pax/cache.c +++ b/bin/pax/cache.c @@ -203,7 +203,7 @@ name_uid(uid_t uid, int frc) ++pwopn; } if (ptr == NULL) - ptr = (UIDC *)malloc(sizeof(UIDC)); + ptr = uidtb[uid % UID_SZ] = (UIDC *)malloc(sizeof(UIDC)); if ((pw = getpwuid(uid)) == NULL) { /* @@ -274,7 +274,7 @@ name_gid(gid_t gid, int frc) ++gropn; } if (ptr == NULL) - ptr = (GIDC *)malloc(sizeof(GIDC)); + ptr = gidtb[gid % GID_SZ] = (GIDC *)malloc(sizeof(GIDC)); if ((gr = getgrgid(gid)) == NULL) { /*