Fix wrong check after allocation.

This commit is contained in:
Simo Sorce 2012-07-06 16:11:32 -04:00
parent 61c3b86d73
commit 6ffb35d0f5

View File

@ -446,7 +446,7 @@ int ipapwd_gen_hashes(struct ipapwd_krbcfg *krbcfg,
if (is_ipant) {
*ntvals = (Slapi_Value **)calloc(2, sizeof(Slapi_Value *));
if (!svals) {
if (!*ntvals) {
LOG_OOM();
rc = LDAP_OPERATIONS_ERROR;
goto done;