From: claudio Date: Wed, 7 Apr 2021 16:29:14 +0000 (+0000) Subject: Free the parser then close the file. Seems like the better order. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fef832f00f4d30b2dc8d913ff0f430881362ad58;p=openbsd Free the parser then close the file. Seems like the better order. --- diff --git a/usr.sbin/rpki-client/rrdp.c b/usr.sbin/rpki-client/rrdp.c index 2f43f75f9e8..4464e503368 100644 --- a/usr.sbin/rpki-client/rrdp.c +++ b/usr.sbin/rpki-client/rrdp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rrdp.c,v 1.2 2021/04/06 18:35:46 claudio Exp $ */ +/* $OpenBSD: rrdp.c,v 1.3 2021/04/07 16:29:14 claudio Exp $ */ /* * Copyright (c) 2020 Nils Fisher * Copyright (c) 2021 Claudio Jeker @@ -230,10 +230,10 @@ rrdp_free(struct rrdp *s) free_snapshot_xml(s->sxml); free_delta_xml(s->dxml); - if (s->infd != -1) - close(s->infd); if (s->parser) XML_ParserFree(s->parser); + if (s->infd != -1) + close(s->infd); free(s->notifyuri); free(s->local); free(s->last_mod);