~ne02ptzero/libfloat

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] raft: Set last_log when reloading state

Louis Solofrizzo <lsolofrizzo@scaleway.com>
Details
Message ID
<20220915111721.3644141-1-lsolofrizzo@scaleway.com>
DKIM signature
pass
Download raw message
Patch: +1 -1
Avoiding a use-after-free error on AE receive

Signed-off-by: Louis Solofrizzo <lsolofrizzo@scaleway.com>
---
 raft.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/raft.c b/raft.c
index 8bd9322..90d5e55 100644
--- a/raft.c
+++ b/raft.c
@@ -116,7 +116,6 @@ void libfloat_reload_state(libfloat_ctx_t *ctx)
        libfloat_log_memory_cleanup(ctx);
    }

    /* XXX some part of code try to load missing log but other not */
    for (size_t i = ctx->persistent.snapshot.index + 1; i <= ctx->persistent.commit_index; i++)
    {
        libfloat_log_entry_t    *log;
@@ -131,6 +130,7 @@ void libfloat_reload_state(libfloat_ctx_t *ctx)

        iterator = kh_put(libfloat_entry_id_t, ctx->persistent.log, log->id, &absent);
        kh_value(ctx->persistent.log, iterator) = log;
        ctx->last_log = log;
    }
}

-- 
2.37.3
Details
Message ID
<b726c6fa-b3a4-42fd-bc5f-10e510c26254@ptrk.io>
In-Reply-To
<20220915111721.3644141-1-lsolofrizzo@scaleway.com> (view parent)
DKIM signature
pass
Download raw message
LG
Reply to thread Export thread (mbox)