r4291 *alloc fix problems
Albert Chin
samba-technical at mlists.thewrittenword.com
Tue Dec 21 06:38:16 GMT 2004
On Mon, Dec 20, 2004 at 08:34:31PM -0800, Jeremy Allison wrote:
> On Mon, Dec 20, 2004 at 09:45:58PM -0600, Albert Chin wrote:
> > Some of the *alloc fixes in r4291 for source/lib/util_smbd.c and
> > source/lib/sysacls.c are incorrect.
>
> Got it - applied to SVN source. Thanks !
One change left out (source/lib/util_smbd.c).
I've added a change to source/printing/print_svid.c that I missed
earlier as well.
--
albert chin (china at thewrittenword.com)
-- snip snip
Index: source/lib/util_smbd.c
===================================================================
--- source/lib/util_smbd.c (revision 4305)
+++ source/lib/util_smbd.c (working copy)
@@ -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;
}
Index: source/printing/print_svid.c
===================================================================
--- source/printing/print_svid.c (revision 4305)
+++ source/printing/print_svid.c (working copy)
@@ -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-technical
mailing list