]> granicus.if.org Git - apache/commitdiff
No need to clear memory that is fully initialized just the line after.
authorChristophe Jaillet <jailletc36@apache.org>
Mon, 10 Dec 2012 20:19:20 +0000 (20:19 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Mon, 10 Dec 2012 20:19:20 +0000 (20:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1419719 13f79535-47bb-0310-9956-ffa450edef68

modules/ldap/util_ldap.c

index fae39bd3ffee69134581e696400409d7f6c0bbae..f6db684796fe5218f6b83533ab9d4f4a5d5b0136 100644 (file)
@@ -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(request_rec *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_rec *r, util_ldap_connection_t *ldc,
                 *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]);
                     }