Author: jra Date: 2004-12-21 07:08:16 +0000 (Tue, 21 Dec 2004) New Revision: 4307
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4307 Log: Couple more MALLOC fixes from albert chin ([EMAIL PROTECTED]). Jeremy. Modified: trunk/source/lib/util_smbd.c trunk/source/printing/print_svid.c Changeset: Modified: trunk/source/lib/util_smbd.c =================================================================== --- trunk/source/lib/util_smbd.c 2004-12-21 07:08:11 UTC (rev 4306) +++ trunk/source/lib/util_smbd.c 2004-12-21 07:08:16 UTC (rev 4307) @@ -45,7 +45,7 @@ int i; max_grp = groups_max(); - temp_groups = SMB_MALLOC_P(gid_t, max_grp); + temp_groups = SMB_MALLOC_ARRAY(gid_t, max_grp); if (! temp_groups) { return False; } Modified: trunk/source/printing/print_svid.c =================================================================== --- trunk/source/printing/print_svid.c 2004-12-21 07:08:11 UTC (rev 4306) +++ trunk/source/printing/print_svid.c 2004-12-21 07:08:16 UTC (rev 4307) @@ -88,7 +88,7 @@ *tmp = '\0'; /* add it to the cache */ - if ((ptmp = malloc(sizeof (*ptmp))) != NULL) { + if ((ptmp = SMB_MALLOC_P(printer_t)) != NULL) { ZERO_STRUCTP(ptmp); if((ptmp->name = SMB_STRDUP(name)) == NULL) DEBUG(0,("populate_printers: malloc fail in strdup !\n"));