X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibrewrite%2Fxmap.c;h=f4410898d19f92263f98d045b5e503c5171be9a1;hb=1705fa7e553201d5415513a85925268d21575c99;hp=4e92d87b513c0fd172baea1e3a6a4013d60faa67;hpb=cdcf70eeb6b863d4d135ccb010da7f69e52b6723;p=openldap diff --git a/libraries/librewrite/xmap.c b/libraries/librewrite/xmap.c index 4e92d87b51..f4410898d1 100644 --- a/libraries/librewrite/xmap.c +++ b/libraries/librewrite/xmap.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2000-2014 The OpenLDAP Foundation. + * Copyright 2000-2015 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -335,7 +335,11 @@ rewrite_xmap_apply( && ( p = strtok( NULL, "" ) ) ) { val->bv_val = strdup( p ); if ( val->bv_val == NULL ) { - return REWRITE_ERR; +#ifdef USE_REWRITE_LDAP_PVT_THREADS + ldap_pvt_thread_mutex_unlock( &map->lm_mutex ); +#endif /* USE_REWRITE_LDAP_PVT_THREADS */ + rc = REWRITE_ERR; + goto rc_return; } val->bv_len = strlen( p );