diff --git a/src/raft/uv_list.c b/src/raft/uv_list.c index 18639db36..7c0a31bef 100644 --- a/src/raft/uv_list.c +++ b/src/raft/uv_list.c @@ -100,6 +100,12 @@ int UvList(struct uv *uv, if (rv != 0 && *segments != NULL) { raft_free(*segments); + *segments = NULL; + } + + if (rv != 0 && *snapshots != NULL) { + raft_free(*snapshots); + *snapshots = NULL; } if (*snapshots != NULL) {