]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#10307 Initialise last if we use it later
authorOndřej Kuzník <ondra@mistotebe.net>
Mon, 10 Feb 2025 14:37:45 +0000 (14:37 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 19 Feb 2025 18:25:37 +0000 (18:25 +0000)
servers/slapd/bconfig.c

index 9c4ab3808023f85e682c27cff8d0b61122e0664e..3d1d06d4b47c4810bc961ddbacc31e28b5e8ba21 100644 (file)
@@ -6461,7 +6461,7 @@ static int
 config_back_modify( Operation *op, SlapReply *rs )
 {
        CfBackInfo *cfb;
-       CfEntryInfo *ce, *last;
+       CfEntryInfo *ce, *last = NULL;
        Modifications *ml;
        ConfigArgs ca = {0};
        struct berval rdn;
@@ -6573,7 +6573,7 @@ static int
 config_back_modrdn( Operation *op, SlapReply *rs )
 {
        CfBackInfo *cfb;
-       CfEntryInfo *ce, *last;
+       CfEntryInfo *ce, *last = NULL;
        struct berval rdn;
        int ixold, ixnew, dopause = 1;
 
@@ -6790,7 +6790,7 @@ config_back_delete( Operation *op, SlapReply *rs )
 {
 #ifdef SLAP_CONFIG_DELETE
        CfBackInfo *cfb;
-       CfEntryInfo *ce, *last, *ce2;
+       CfEntryInfo *ce, *ce2, *last = NULL;
        int dopause = 1;
 
        cfb = (CfBackInfo *)op->o_bd->be_private;
@@ -6942,7 +6942,7 @@ static int
 config_back_search( Operation *op, SlapReply *rs )
 {
        CfBackInfo *cfb;
-       CfEntryInfo *ce, *last;
+       CfEntryInfo *ce, *last = NULL;
        slap_mask_t mask;
 
        cfb = (CfBackInfo *)op->o_bd->be_private;
@@ -7023,7 +7023,7 @@ int config_back_entry_get(
        Entry **ent )
 {
        CfBackInfo *cfb;
-       CfEntryInfo *ce, *last;
+       CfEntryInfo *ce, *last = NULL;
        Entry *e = NULL;
        int paused = 0, rc = LDAP_NO_SUCH_OBJECT;
 
@@ -7334,7 +7334,7 @@ config_check_schema(Operation *op, CfBackInfo *cfb)
 {
        struct berval schema_dn = BER_BVC(SCHEMA_RDN "," CONFIG_RDN);
        ConfigArgs c = {0};
-       CfEntryInfo *ce, *last;
+       CfEntryInfo *ce, *last = NULL;
        Entry *e;
 
        /* If there's no root entry, we must be in the midst of converting */
@@ -8042,7 +8042,7 @@ config_tool_entry_modify( BackendDB *be, Entry *e, struct berval *text )
 {
        CfBackInfo *cfb = be->be_private;
        BackendInfo *bi = cfb->cb_db.bd_info;
-       CfEntryInfo *ce, *last;
+       CfEntryInfo *ce, *last = NULL;
 
        ce = config_find_base( cfb->cb_root, &e->e_nname, &last, NULL );
 
@@ -8057,7 +8057,7 @@ config_tool_entry_delete( BackendDB *be, struct berval *ndn, struct berval *text
 {
        CfBackInfo *cfb = be->be_private;
        BackendInfo *bi = cfb->cb_db.bd_info;
-       CfEntryInfo *ce, *last;
+       CfEntryInfo *ce, *last = NULL;
 
        ce = config_find_base( cfb->cb_root, ndn, &last, NULL );