r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
[samba.git] / source3 / passdb / lookup_sid.c
index 4df497461a4fa78e52e4667cb67ea6a09f49344f..8a3d35defd95cc9b2e302f43b0d454497ff5e98b 100644 (file)
@@ -208,7 +208,7 @@ static void store_uid_sid_cache(const DOM_SID *psid, uid_t uid)
                }
        }
 
-       pc = (struct uid_sid_cache *)malloc(sizeof(struct uid_sid_cache));
+       pc = SMB_MALLOC_P(struct uid_sid_cache);
        if (!pc)
                return;
        pc->uid = uid;
@@ -282,7 +282,7 @@ static void store_gid_sid_cache(const DOM_SID *psid, gid_t gid)
                }
        }
 
-       pc = (struct gid_sid_cache *)malloc(sizeof(struct gid_sid_cache));
+       pc = SMB_MALLOC_P(struct gid_sid_cache);
        if (!pc)
                return;
        pc->gid = gid;