]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
fix potential memory leak in makemultiversionconflict()
authorMichael Schroeder <mls@suse.de>
Fri, 18 Jul 2014 14:59:46 +0000 (16:59 +0200)
committerMichael Schroeder <mls@suse.de>
Fri, 18 Jul 2014 14:59:46 +0000 (16:59 +0200)
src/rules.c

index 6b561cc1e39177e9cd4ada06899052d14348be51..f245533c564ec3861fe1553b3c6b4634e35a8693 100644 (file)
@@ -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