]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9146 syncprov: fix sessionlog init
authorHoward Chu <hyc@openldap.org>
Wed, 8 Jan 2020 22:22:14 +0000 (22:22 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 9 Jan 2020 17:11:53 +0000 (17:11 +0000)
servers/slapd/overlays/syncprov.c

index c8e457c42038c549b647a173f19edc8450615d19..0e1f362f03db3e87c9c6e76130b93bea1536d707 100644 (file)
@@ -3079,12 +3079,7 @@ sp_cf_gen(ConfigArgs *c)
                }
                sl = si->si_logs;
                if ( !sl ) {
-                       sl = ch_malloc( sizeof( sessionlog ));
-                       sl->sl_mincsn = NULL;
-                       sl->sl_sids = NULL;
-                       sl->sl_num = 0;
-                       sl->sl_numcsns = 0;
-                       sl->sl_head = sl->sl_tail = NULL;
+                       sl = ch_calloc( 1, sizeof( sessionlog ));
                        ldap_pvt_thread_mutex_init( &sl->sl_mutex );
                        si->si_logs = sl;
                }