From: Ingo Weinhold Date: Thu, 18 Apr 2013 14:22:57 +0000 (+0200) Subject: selection_filter(): Don't leak Queue q1 and Map m2 X-Git-Tag: upstream/0.4.0~169^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f227f203660c4b216d04f88a23ca2c8c5739281;p=platform%2Fupstream%2Flibsolv.git selection_filter(): Don't leak Queue q1 and Map m2 --- diff --git a/src/selection.c b/src/selection.c index 8ec633f..d179b57 100644 --- a/src/selection.c +++ b/src/selection.c @@ -803,7 +803,11 @@ selection_filter(Pool *pool, Queue *sel1, Queue *sel2) { Id select = sel2->elements[i] & SOLVER_SELECTMASK; if (select == SOLVER_SOLVABLE_ALL) - return; + { + queue_free(&q1); + map_free(&m2); + return; + } if (select == SOLVER_SOLVABLE_REPO) { Solvable *s; @@ -878,6 +882,8 @@ selection_filter(Pool *pool, Queue *sel1, Queue *sel2) j += 2; } queue_truncate(sel1, j); + queue_free(&q1); + map_free(&m2); } void