From 0deed4f438cd73bb0dd17cb25fcbb676223c4fc9 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Apr 23 2020 14:26:58 +0000 Subject: 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. --- diff --git a/lib/transaction.c b/lib/transaction.c index 67b9db5..e2854a0 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1215,8 +1215,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);