From fef832f00f4d30b2dc8d913ff0f430881362ad58 Mon Sep 17 00:00:00 2001 From: claudio Date: Wed, 7 Apr 2021 16:29:14 +0000 Subject: [PATCH] Free the parser then close the file. Seems like the better order. --- usr.sbin/rpki-client/rrdp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.20.1