svn commit: samba r4306 - in branches/SAMBA_3_0/source: lib printing

jra at samba.org jra at samba.org
Tue Dec 21 07:08:11 GMT 2004


Author: jra
Date: 2004-12-21 07:08:11 +0000 (Tue, 21 Dec 2004)
New Revision: 4306

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4306

Log:
Couple more MALLOC fixes from albert chin (china at thewrittenword.com).
Jeremy.

Modified:
   branches/SAMBA_3_0/source/lib/util_smbd.c
   branches/SAMBA_3_0/source/printing/print_svid.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/util_smbd.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util_smbd.c	2004-12-21 04:34:14 UTC (rev 4305)
+++ branches/SAMBA_3_0/source/lib/util_smbd.c	2004-12-21 07:08:11 UTC (rev 4306)
@@ -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: branches/SAMBA_3_0/source/printing/print_svid.c
===================================================================
--- branches/SAMBA_3_0/source/printing/print_svid.c	2004-12-21 04:34:14 UTC (rev 4305)
+++ branches/SAMBA_3_0/source/printing/print_svid.c	2004-12-21 07:08:11 UTC (rev 4306)
@@ -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"));



More information about the samba-cvs mailing list