From: Michael Schroeder Date: Fri, 18 Jul 2014 14:59:46 +0000 (+0200) Subject: fix potential memory leak in makemultiversionconflict() X-Git-Tag: 0.6.5~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ffaa58a99d001c987a858fc284bd799bf20536c;p=thirdparty%2Flibsolv.git fix potential memory leak in makemultiversionconflict() --- 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