From dcaa8a7c46583b01cb79bc55549b0cb6a13a96ed Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 10 Feb 2022 11:11:22 +0000 Subject: [PATCH] Free s->last_mod before overwriting it with a new last_mod. ok claudio --- usr.sbin/rpki-client/rrdp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/rpki-client/rrdp.c b/usr.sbin/rpki-client/rrdp.c index 4d3942105b1..8a4e8cb3f36 100644 --- a/usr.sbin/rpki-client/rrdp.c +++ b/usr.sbin/rpki-client/rrdp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rrdp.c,v 1.21 2022/01/23 12:09:24 claudio Exp $ */ +/* $OpenBSD: rrdp.c,v 1.22 2022/02/10 11:11:22 tb Exp $ */ /* * Copyright (c) 2020 Nils Fisher * Copyright (c) 2021 Claudio Jeker @@ -429,6 +429,7 @@ rrdp_input_handler(int fd) errx(1, "%s: bad internal state", s->local); s->res = res; + free(s->last_mod); s->last_mod = last_mod; s->state |= RRDP_STATE_HTTP_DONE; rrdp_finished(s); -- 2.20.1