From e176adaafef36a4e4aced5b6b31cc823cd0f027a Mon Sep 17 00:00:00 2001
From: Quanah Gibson-Mount <quanah@openldap.org>
Date: Mon, 11 Feb 2008 23:33:08 +0000
Subject: [PATCH] ldap_pvt_thread_pool_getkey() arg 'data' should point to a
 void* variable

---
 contrib/slapd-modules/smbk5pwd/smbk5pwd.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/contrib/slapd-modules/smbk5pwd/smbk5pwd.c b/contrib/slapd-modules/smbk5pwd/smbk5pwd.c
index 85a6260d57..545a00cc72 100644
--- a/contrib/slapd-modules/smbk5pwd/smbk5pwd.c
+++ b/contrib/slapd-modules/smbk5pwd/smbk5pwd.c
@@ -268,7 +268,7 @@ static int k5key_chk(
 	const struct berval *cred,
 	const char **text )
 {
-	void *ctx;
+	void *ctx, *op_tmp;
 	Operation *op;
 	int rc;
 	Entry *e;
@@ -281,9 +281,10 @@ static int k5key_chk(
 	/* Find our thread context, find our Operation */
 	ctx = ldap_pvt_thread_pool_context();
 
-	if ( ldap_pvt_thread_pool_getkey( ctx, smbk5pwd_op_cleanup, (void **)&op, NULL ) ||
-		!op )
+	if ( ldap_pvt_thread_pool_getkey( ctx, smbk5pwd_op_cleanup, &op_tmp, NULL )
+		 || !op_tmp )
 		return LUTIL_PASSWD_ERR;
+	op = op_tmp;
 
 	rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &e );
 	if ( rc != LDAP_SUCCESS ) return LUTIL_PASSWD_ERR;
-- 
GitLab