diff options
author | Jeremy Allison <jra@samba.org> | 2004-12-21 07:08:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:43 -0500 |
commit | ebeddee6a1341b25a68fe7dd4983becf91d760b7 (patch) | |
tree | db7921298aa5133bf72b3a40b4af6d5d8dbd2981 /source3 | |
parent | 99f0355eb5fbc20e37a312977c97b5d378fff2bf (diff) | |
download | samba-ebeddee6a1341b25a68fe7dd4983becf91d760b7.tar.gz samba-ebeddee6a1341b25a68fe7dd4983becf91d760b7.tar.bz2 samba-ebeddee6a1341b25a68fe7dd4983becf91d760b7.zip |
r4306: Couple more MALLOC fixes from albert chin (china@thewrittenword.com).
Jeremy.
(This used to be commit c5a8bf3335606c070e1c74f339ea4c22d0adfa57)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util_smbd.c | 2 | ||||
-rw-r--r-- | source3/printing/print_svid.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/util_smbd.c b/source3/lib/util_smbd.c index 58e7d9c627..586362c1e4 100644 --- a/source3/lib/util_smbd.c +++ b/source3/lib/util_smbd.c @@ -45,7 +45,7 @@ BOOL getgroups_user(const char *user, gid_t primary_gid, gid_t **ret_groups, int 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; } diff --git a/source3/printing/print_svid.c b/source3/printing/print_svid.c index c7a8c9413d..d9db500425 100644 --- a/source3/printing/print_svid.c +++ b/source3/printing/print_svid.c @@ -88,7 +88,7 @@ static void populate_printers(void) *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")); |