summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-04-02 08:07:48 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-04-02 08:07:48 +0000
commit3a8da31ed5c0c3705858c4a8d685d838eca8da13 (patch)
tree12a6819aec9cf939795fb495d18e70ce977a2c12
parent395a970b3d49fcd9b3b3a1b914888bbf3269a9f7 (diff)
Don't leak the uri of a delta with duplicate serial.
ok claudio deraadt
-rw-r--r--usr.sbin/rpki-client/rrdp_notification.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/rpki-client/rrdp_notification.c b/usr.sbin/rpki-client/rrdp_notification.c
index 501e5176704..7381e0ee660 100644
--- a/usr.sbin/rpki-client/rrdp_notification.c
+++ b/usr.sbin/rpki-client/rrdp_notification.c
@@ -62,6 +62,8 @@ struct notification_xml {
enum notification_scope scope;
};
+static void free_delta(struct delta_item *);
+
static int
add_delta(struct notification_xml *nxml, const char *uri,
const char hash[SHA256_DIGEST_LENGTH], long long serial)
@@ -85,7 +87,7 @@ add_delta(struct notification_xml *nxml, const char *uri,
TAILQ_FOREACH(n, &nxml->delta_q, q) {
if (n->serial == serial) {
warnx("duplicate delta serial %lld ", serial);
- free(d);
+ free_delta(d);
return 0;
}
if (n->serial > serial) {