]> git.sur5r.net Git - openldap/commitdiff
Catch slapmodify entry setup errors
authorHallvard Furuseth <hallvard@openldap.org>
Sun, 12 Jun 2016 06:35:25 +0000 (08:35 +0200)
committerHallvard Furuseth <hallvard@openldap.org>
Sun, 12 Jun 2016 06:35:25 +0000 (08:35 +0200)
servers/slapd/slapmodify.c

index 0954bb21b100db6809722fc751c32cdd7414ba60..77ab75159025c9ee4a688369e037351a7542707c 100644 (file)
@@ -285,7 +285,9 @@ slapmodify( int argc, char **argv )
                                rc = (id == NOID);
                                if ( rc == LDAP_SUCCESS && lr.lr_op != LDAP_REQ_DELETE ) {
                                        e_orig = be->be_entry_get( be, id );
-                                       e = entry_dup( e_orig );
+                                       if ( e_orig )
+                                               e = entry_dup( e_orig );
+                                       rc = (e == NULL);
                                }
                                break;
                }