From 123c51ed4de560067a11b111a1f13c24140fd8c4 Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Fri, 27 Sep 2024 12:55:04 +0000 Subject: rpki-client: free deltas in rrdp_session_parse() as in rrdp_repo_free() ok claudio --- usr.sbin/rpki-client/repo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/rpki-client/repo.c b/usr.sbin/rpki-client/repo.c index 27ec6fc3648..a50634cedcf 100644 --- a/usr.sbin/rpki-client/repo.c +++ b/usr.sbin/rpki-client/repo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: repo.c,v 1.67 2024/09/19 20:48:36 tb Exp $ */ +/* $OpenBSD: repo.c,v 1.68 2024/09/27 12:55:03 tb Exp $ */ /* * Copyright (c) 2021 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -656,10 +656,10 @@ rrdp_session_parse(struct rrdprepo *rr) { FILE *f; struct rrdp_session *state; - int fd, i, ln = 0, deltacnt = 0; + int fd, ln = 0, deltacnt = 0; const char *errstr; char *line = NULL, *file; - size_t len = 0; + size_t i, len = 0; ssize_t n; time_t now, weeks; @@ -749,7 +749,7 @@ rrdp_session_parse(struct rrdprepo *rr) free(line); free(state->session_id); free(state->last_mod); - for (i = 0; i < MAX_RRDP_DELTAS; i++) + for (i = 0; i < sizeof(state->deltas) / sizeof(state->deltas[0]); i++) free(state->deltas[i]); memset(state, 0, sizeof(*state)); rr->last_reset = now; -- cgit v1.2.3