From: tb Date: Wed, 17 Apr 2024 15:03:22 +0000 (+0000) Subject: Simplify super ugly exit path X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fc437288a363c6ed40e3a8ef3e30063d9fa53f30;p=openbsd Simplify super ugly exit path ok job --- diff --git a/usr.sbin/rpki-client/parser.c b/usr.sbin/rpki-client/parser.c index f6257eadd2e..d26d9c77d49 100644 --- a/usr.sbin/rpki-client/parser.c +++ b/usr.sbin/rpki-client/parser.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parser.c,v 1.133 2024/04/17 15:00:50 job Exp $ */ +/* $OpenBSD: parser.c,v 1.134 2024/04/17 15:03:22 tb Exp $ */ /* * Copyright (c) 2019 Claudio Jeker * Copyright (c) 2019 Kristaps Dzonsons @@ -480,12 +480,11 @@ proc_parser_mft(struct entity *entp, struct mft **mp, char **crlfile, if (*mp != NULL) { *crlmtime = crl->thisupdate; - if (!crl_insert(&crlt, crl)) { - crl_free(crl); - } - } else { - crl_free(crl); + if (crl_insert(&crlt, crl)) + crl = NULL; } + crl_free(crl); + return file; }