summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-09-27 12:55:04 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-09-27 12:55:04 +0000
commit123c51ed4de560067a11b111a1f13c24140fd8c4 (patch)
tree0530307648d4ff2aa6b945b8b8ad061089bd1071
parent8c5259c541bdd5d0c69f84bc1794c16e6444c449 (diff)
rpki-client: free deltas in rrdp_session_parse() as in rrdp_repo_free()
ok claudio
-rw-r--r--usr.sbin/rpki-client/repo.c8
1 files 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 <claudio@openbsd.org>
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -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;