]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/overlays/rwmconf.c
Plug memleak when query isn't added to cache
[openldap] / servers / slapd / overlays / rwmconf.c
index 14abdb39c8686d34e12d75ee7a843965a6c5ae50..6aef81051c666013cf2a7daae45047eb55e50ccb 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1999-2005 The OpenLDAP Foundation.
+ * Copyright 1999-2006 The OpenLDAP Foundation.
  * Portions Copyright 1999-2003 Howard Chu.
  * Portions Copyright 2000-2003 Pierangelo Masarati.
  * All rights reserved.
@@ -146,7 +146,7 @@ rwm_map_config(
                        if ( mapping[0].m_dst_oc == NULL ) {
                                fprintf( stderr, "%s: line %d: unable to mimic destination objectClass '%s'\n",
                                        fname, lineno, dst );
-                               return 1;
+                               goto error_return;
                        }
 
 #if 0
@@ -186,7 +186,7 @@ rwm_map_config(
                                        fprintf( stderr,
        "%s: line %d: source attributeType '%s': %d (%s)\n",
                                                fname, lineno, src, rc, text ? text : "null" );
-                                       return 1;
+                                       goto error_return;
                                }
 
                        }
@@ -207,7 +207,7 @@ rwm_map_config(
                                fprintf( stderr,
        "%s: line %d: destination attributeType '%s': %d (%s)\n",
                                        fname, lineno, dst, rc, text ? text : "null" );
-                               return 1;
+                               goto error_return;
                        }
                }
                mapping[1].m_src_ad = mapping[0].m_dst_ad;
@@ -249,7 +249,7 @@ rwm_suffix_massage_regexize( const char *s )
        int i;
 
        if ( s[0] == '\0' ) {
-               return ch_strdup( "(.+)" );
+               return ch_strdup( "^(.+)$" );
        }
 
        for ( i = 0, p = s;