httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1419719 - /httpd/httpd/trunk/modules/ldap/util_ldap.c
Date Mon, 10 Dec 2012 20:19:21 GMT
Author: jailletc36
Date: Mon Dec 10 20:19:20 2012
New Revision: 1419719

URL: http://svn.apache.org/viewvc?rev=1419719&view=rev
Log:
No need to clear memory that is fully initialized just the line after.

Modified:
    httpd/httpd/trunk/modules/ldap/util_ldap.c

Modified: httpd/httpd/trunk/modules/ldap/util_ldap.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ldap/util_ldap.c?rev=1419719&r1=1419718&r2=1419719&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ldap/util_ldap.c (original)
+++ httpd/httpd/trunk/modules/ldap/util_ldap.c Mon Dec 10 20:19:20 2012
@@ -1290,8 +1290,8 @@ start_over:
         int sgindex;
         char **group;
         res = apr_pcalloc(r->pool, sizeof(util_compare_subgroup_t));
-        res->subgroupDNs  = apr_pcalloc(r->pool,
-                                        sizeof(char *) * (subgroups->nelts));
+        res->subgroupDNs  = apr_palloc(r->pool,
+                                       sizeof(char *) * (subgroups->nelts));
         for (sgindex = 0; (group = apr_array_pop(subgroups)); sgindex++) {
             res->subgroupDNs[sgindex] = apr_pstrdup(r->pool, *group);
         }
@@ -1435,8 +1435,8 @@ static int uldap_cache_check_subgroups(r
                                                 sizeof(util_compare_subgroup_t));
                     tmp_local_sgl->len = compare_nodep->subgroupList->len;
                     tmp_local_sgl->subgroupDNs =
-                        apr_pcalloc(r->pool,
-                                    sizeof(char *) * compare_nodep->subgroupList->len);
+                        apr_palloc(r->pool,
+                                   sizeof(char *) * compare_nodep->subgroupList->len);
                     for (i = 0; i < compare_nodep->subgroupList->len; i++) {
                         tmp_local_sgl->subgroupDNs[i] =
                             apr_pstrdup(r->pool,
@@ -1905,7 +1905,7 @@ static int uldap_cache_getuserdn(request
                 *binddn = apr_pstrdup(r->pool, search_nodep->dn);
                 if (attrs) {
                     int i;
-                    *retvals = apr_pcalloc(r->pool, sizeof(char *) * search_nodep->numvals);
+                    *retvals = apr_palloc(r->pool, sizeof(char *) * search_nodep->numvals);
                     for (i = 0; i < search_nodep->numvals; i++) {
                         (*retvals)[i] = apr_pstrdup(r->pool, search_nodep->vals[i]);
                     }



Mime
View raw message