diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2022-01-19 09:22:52 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2022-01-19 09:22:52 +0000 |
commit | 3fdc134f4d0cf7f6fb7164e34fd9a9f9267795ee (patch) | |
tree | 213bd401f1f008dcc48bcaf92dccba66b248ccea /usr.sbin | |
parent | fe1df4c5e1b987c2c730361f562704e57259e63b (diff) |
rpki-client: don't leak nfile if no repo is found.
ok claudio
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rpki-client/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/rpki-client/main.c b/usr.sbin/rpki-client/main.c index 1a0df6ec433..5e7b05e04cf 100644 --- a/usr.sbin/rpki-client/main.c +++ b/usr.sbin/rpki-client/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.176 2022/01/14 15:00:23 claudio Exp $ */ +/* $OpenBSD: main.c,v 1.177 2022/01/19 09:22:51 tb Exp $ */ /* * Copyright (c) 2021 Claudio Jeker <claudio@openbsd.org> * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> @@ -429,8 +429,10 @@ queue_add_from_tal(struct tal *tal) /* Look up the repository. */ repo = ta_lookup(tal->id, tal); - if (repo == NULL) + if (repo == NULL) { + free(nfile); return; + } /* steal the pkey from the tal structure */ data = tal->pkey; |