X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibrewrite%2Fxmap.c;h=f4410898d19f92263f98d045b5e503c5171be9a1;hb=1705fa7e553201d5415513a85925268d21575c99;hp=f50eac06b1b990ed4a02fbbcbaa7a625aa2b1330;hpb=6e9762f9e7e1259a50a3621f15002e66573cc300;p=openldap diff --git a/libraries/librewrite/xmap.c b/libraries/librewrite/xmap.c index f50eac06b1..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-2013 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 );