]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/schema_init.c
Merge remote-tracking branch 'origin/mdb.master'
[openldap] / servers / slapd / schema_init.c
index 14064af23028e5602d873a5293b0b819096da744..080bd6a7add89b4e5a645c9ed8efa091d455e3c8 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2011 The OpenLDAP Foundation.
+ * Copyright 1998-2012 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -2155,7 +2155,11 @@ approxIndexer(
                        len = strlen( c );
                        if( len < SLAPD_APPROX_WORDLEN ) continue;
                        ber_str2bv( phonetic( c ), 0, 0, &keys[keycount] );
-                       keycount++;
+                       if( keys[keycount].bv_len ) {
+                               keycount++;
+                       } else {
+                               ch_free( keys[keycount].bv_val );
+                       }
                        i++;
                }