From f822ffcbd7ab28dd478c8652302f30ed099d4d03 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 11 Oct 2011 10:31:40 +0300 Subject: [PATCH] Let headerLoad() failure message come through - headerVerify() always returns with a message even for OK results, which was masking the error message from headerLoad(), sometimes giving not very helpful "headerRead failed: Header sanity check OK" style messages. --- lib/package.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/package.c b/lib/package.c index a65a61a01..20b45ff72 100644 --- a/lib/package.c +++ b/lib/package.c @@ -451,13 +451,14 @@ static rpmRC rpmpkgReadHeader(rpmKeyring keyring, rpmVSFlags vsflags, } /* Sanity check header tags */ - rc = headerVerify(keyring, vsflags, ei, uc, msg); + rc = headerVerify(keyring, vsflags, ei, uc, &buf); if (rc != RPMRC_OK) goto exit; /* OK, blob looks sane, load the header. */ h = headerLoad(ei); if (h == NULL) { + free(buf); rasprintf(&buf, _("hdr load: BAD\n")); rc = RPMRC_FAIL; goto exit;