dcavalca / rpms / rpm

Forked from rpms/rpm 2 years ago
Clone
Blob Blame History Raw
From 788935c9ea9d2f469f24be10a9fa998594046731 Mon Sep 17 00:00:00 2001
From: Panu Matilainen <pmatilai@redhat.com>
Date: Fri, 7 Sep 2018 11:52:33 +0300
Subject: [PATCH] Fix a blindingly obvious memleak in package verify step

Erm. Introduced in commit 765e2c72ae8be369ada41d4747b8999519a0e327,
but how on earth did this go unnoticed... *blush*
---
 lib/transaction.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/transaction.c b/lib/transaction.c
index 205c3f388..3969ad3fc 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -1261,6 +1261,7 @@ static int verifyPackageFiles(rpmts ts, rpm_loff_t total)
 	    rpmteAddProblem(p, RPMPROB_VERIFY, NULL, vd.msg, 0);
 
 	vd.msg = _free(vd.msg);
+	rpmvsFree(vs);
     }
     rpmtsNotify(ts, NULL, RPMCALLBACK_VERIFY_STOP, total, total);
 
-- 
2.21.0