]> git.sur5r.net Git - openldap/commitdiff
ITS#4466 fix typo, uninit'd var
authorHoward Chu <hyc@openldap.org>
Tue, 16 May 2006 22:16:13 +0000 (22:16 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 16 May 2006 22:16:13 +0000 (22:16 +0000)
servers/slapd/slapi/slapi_pblock.c

index 7ced8458766f1973134081c6dc79c1ca3ba5a325..ea6d4edcb2ae8eaee35e99b34cfd04e6264b7f08 100644 (file)
@@ -624,7 +624,7 @@ pblock_get( Slapi_PBlock *pb, int param, void **value )
                break;
        case SLAPI_MODIFY_MODS: {
                LDAPMod **mods = NULL;
-               Modifications *ml;
+               Modifications *ml = NULL;
 
                pblock_get_default( pb, param, (void **)&mods );
                if ( mods == NULL && pb->pb_intop == 0 ) {
@@ -635,12 +635,14 @@ pblock_get( Slapi_PBlock *pb, int param, void **value )
                        case LDAP_REQ_MODRDN:
                                ml = pb->pb_op->orr_modlist;
                                break;
-                       defaulat:
+                       default:
                                rc = PBLOCK_ERROR;
                                break;
                        }
-                       mods = slapi_int_modifications2ldapmods( ml );
-                       pblock_set_default( pb, param, (void *)mods );
+                       if ( rc != PBLOCK_ERROR ) {
+                               mods = slapi_int_modifications2ldapmods( ml );
+                               pblock_set_default( pb, param, (void *)mods );
+                       }
                }
                *((LDAPMod ***)value) = mods;
                break;