]> 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:24:52 +0000 (18:24 +0000)
servers/slapd/bconfig.c

index 8ae98e12e60de8153c6ce6783cfc7a30c3d1b06b..c542c6b3f8bd07cbb6c8943a0a33d6b0ec50041a 100644 (file)
@@ -6329,7 +6329,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;
@@ -6492,7 +6492,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;
 
@@ -6758,7 +6758,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;
 
        LDAPControl **preread_ctrl = NULL;
@@ -6947,7 +6947,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;
@@ -7028,7 +7028,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;
 
@@ -7340,7 +7340,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 */
@@ -8048,7 +8048,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 );
 
@@ -8063,7 +8063,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 );