From 4ffaa58a99d001c987a858fc284bd799bf20536c Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Fri, 18 Jul 2014 16:59:46 +0200 Subject: [PATCH] fix potential memory leak in makemultiversionconflict() --- src/rules.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/rules.c b/src/rules.c index 6b561cc1..f245533c 100644 --- a/src/rules.c +++ b/src/rules.c @@ -434,8 +434,11 @@ makemultiversionconflict(Solver *solv, Id n, Id con) queue_push(&q, p); } if (q.count == 1) - return -n; /* no other package found, generate normal conflict */ - return pool_queuetowhatprovides(pool, &q); + n = -n; /* no other package found, generate normal conflict */ + else + n = pool_queuetowhatprovides(pool, &q); + queue_free(&q); + return n; } static inline void -- 2.47.2