X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=libraries%2Flibrewrite%2Fxmap.c;h=8c09f5a0ce7127eb8c18dd1fbed260afe281356e;hb=59e9ff6243465640956b58ad1756a3ede53eca7c;hp=4e92d87b513c0fd172baea1e3a6a4013d60faa67;hpb=55957253ccf9e9e5dfa122194a0ab10659b0624f;p=openldap diff --git a/libraries/librewrite/xmap.c b/libraries/librewrite/xmap.c index 4e92d87b51..8c09f5a0ce 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-2018 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 );