]> granicus.if.org Git - apache/commitdiff
A quick fix to avoid potential memory issues.
authorPaul J. Reder <rederpj@apache.org>
Fri, 16 Nov 2007 23:14:56 +0000 (23:14 +0000)
committerPaul J. Reder <rederpj@apache.org>
Fri, 16 Nov 2007 23:14:56 +0000 (23:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@595866 13f79535-47bb-0310-9956-ffa450edef68

modules/ldap/util_ldap_cache.c

index 2217b20b7f10ea2882d63b38c7340d2a0aa2db70..972e6ce64b5f6c4d7ba35addcaba5bdf17abf799 100644 (file)
@@ -266,7 +266,13 @@ void *util_ldap_compare_node_copy(util_ald_cache_t *cache, void *c)
         }
         node->lastcompare = n->lastcompare;
         node->result = n->result;
-        node->sgl_processed = n->sgl_processed;
+        if (n->subgroupList && !node->subgroupList ) {
+           /* original entry had an SGL, no shared memory left to copy it */
+           node->sgl_processed = 0;
+       }
+       else {
+            node->sgl_processed = n->sgl_processed;
+        }
         return node;
     }
     else {