diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2019-08-06 13:06:16 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2019-08-28 12:16:52 +0300 |
commit | 307d608e98f78bfe17e79c53fcde56ba8917728f (patch) | |
tree | 26959ef209ef46bfad46cc68dc94c4809e0543dd | |
parent | 0b0f4a1a3c3eca8801e624e68d025afbb6b6e86d (diff) | |
download | rpm-307d608e98f78bfe17e79c53fcde56ba8917728f.tar.gz |
Fix memleak during transaction verify step in the NOKEY case.
Found during RhBug:1714657 QA testing.
In addition, add a comment to clarify the fallthrough as intentional.
(cherry picked from commit 5188a7b35eb3672c9b15e96433e033ee36f8e6a8)
-rw-r--r-- | lib/transaction.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/transaction.c b/lib/transaction.c index 6e4d4be65..e51cff25a 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1226,8 +1226,10 @@ static int vfyCb(struct rpmsinfo_s *sinfo, void *cbdata) */ if (!(vd->vfylevel & RPMSIG_SIGNATURE_TYPE)) sinfo->rc = RPMRC_OK; + /* fallthrough */ default: - vd->msg = rpmsinfoMsg(sinfo); + if (sinfo->rc) + vd->msg = rpmsinfoMsg(sinfo); break; } return (sinfo->rc == 0); |