set return code

This commit is contained in:
Pierangelo Masarati 2003-03-03 21:32:58 +00:00
parent 40622232f7
commit cd41bb1a06

View File

@ -107,10 +107,12 @@ ldap_back_modify(
mods = (LDAPMod *)ch_malloc(i*sizeof(LDAPMod)); mods = (LDAPMod *)ch_malloc(i*sizeof(LDAPMod));
if (mods == NULL) { if (mods == NULL) {
rc = LDAP_NO_MEMORY;
goto cleanup; goto cleanup;
} }
modv = (LDAPMod **)ch_malloc((i+1)*sizeof(LDAPMod *)); modv = (LDAPMod **)ch_malloc((i+1)*sizeof(LDAPMod *));
if (modv == NULL) { if (modv == NULL) {
rc = LDAP_NO_MEMORY;
goto cleanup; goto cleanup;
} }
@ -167,10 +169,12 @@ cleanup:;
#ifdef ENABLE_REWRITE #ifdef ENABLE_REWRITE
} }
#endif /* ENABLE_REWRITE */ #endif /* ENABLE_REWRITE */
for (i=0; modv[i]; i++) for (i=0; modv[i]; i++) {
ch_free(modv[i]->mod_bvalues); ch_free(modv[i]->mod_bvalues);
ch_free(mods); }
ch_free(modv); ch_free( mods );
return( ldap_back_op_result( li, lc, conn, op, msgid, rc, 1 )); ch_free( modv );
return ldap_back_op_result( li, lc, conn, op, msgid, rc, 1 );
} }