X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fschema_init.c;h=080bd6a7add89b4e5a645c9ed8efa091d455e3c8;hb=c6b5abbfd20567116846ebc38f0005c429284c98;hp=14064af23028e5602d873a5293b0b819096da744;hpb=ea026cb2cf048c3700042e9776b183ddda1120a4;p=openldap diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index 14064af230..080bd6a7ad 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * 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++; }