]> 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)
committerHoward Chu <hyc@openldap.org>
Wed, 8 Jan 2020 22:22:14 +0000 (22:22 +0000)
servers/slapd/overlays/syncprov.c

index 1cbdfab471b81b4211a8de2bb49e9bb67d93405e..d3c3871920e234d91dbed1e90c7b6e05bd2da389 100644 (file)
@@ -3099,12 +3099,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;
                }