]> git.sur5r.net Git - openldap/commitdiff
Fix pointer initialization bug
authorKurt Zeilenga <kurt@openldap.org>
Tue, 12 Feb 2002 19:18:39 +0000 (19:18 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Tue, 12 Feb 2002 19:18:39 +0000 (19:18 +0000)
servers/slapd/modify.c

index 5c67446443b9b66325a31479e95d3b42e82c1074..62a6a6da30923e25208f619afaf15711e9b7ecf8 100644 (file)
@@ -117,9 +117,11 @@ do_modify(
                }
 
                mod = (Modifications *) ch_malloc( sizeof(Modifications) );
+               mod->sml_op = mop;
                mod->sml_type = tmp.sml_type;
                mod->sml_bvalues = tmp.sml_bvalues;
                mod->sml_desc = NULL;
+               mod->sml_next =NULL;
                *modtail = mod;
 
                switch( mop ) {
@@ -166,7 +168,6 @@ do_modify(
                        }
                }
 
-               mod->sml_op = mop;
                modtail = &mod->sml_next;
        }
        *modtail = NULL;