]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/options.c
ITS#8262 add ldap_build_*_req functions
[openldap] / libraries / libldap / options.c
index 4d612a8c35edd19c2779053b3d0f407796578524..25cbda24ac3b6f84226f571cdf1a9b5d7511937e 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2014 The OpenLDAP Foundation.
+ * Copyright 1998-2015 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -371,7 +371,9 @@ ldap_get_option(
                        /* bad param */
                        break;
                } 
+               LDAP_MUTEX_LOCK( &ld->ld_ldcmutex );
                * (int *) outvalue = ld->ld_ldcrefcnt;
+               LDAP_MUTEX_UNLOCK( &ld->ld_ldcmutex );
                rc = LDAP_OPT_SUCCESS;
                break;