]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9966 slapo-pcache: fix crash in consistency_check
authorHoward Chu <hyc@openldap.org>
Sun, 25 Dec 2022 11:21:32 +0000 (11:21 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 19 Jan 2023 17:42:09 +0000 (17:42 +0000)
servers/slapd/overlays/pcache.c

index 423c19641e727a59c272d272e6d8d5a205af538d..726eaeb073d9d430557f5baf52288627fa0f8d0c 100644 (file)
@@ -3514,7 +3514,7 @@ consistency_check(
        Operation *op;
 
        CachedQuery *query, *qprev;
-       CachedQuery *expires = NULL;
+       CachedQuery *expires;
        int return_val, pause = PCACHE_CC_PAUSED;
        QueryTemplate *templ;
 
@@ -3537,6 +3537,7 @@ consistency_check(
                time_t ttl;
                if ( !templ->query_last ) continue;
                pause = 0;
+               expires = NULL;
                op->o_time = slap_get_time();
                if ( !templ->ttr ) {
                        ttl = templ->ttl;