From: Michael Schroeder Date: Wed, 15 Jul 2015 09:47:54 +0000 (+0200) Subject: do not ignore the result of solv_realloc when shrinking whatprovidesauxdata X-Git-Tag: 0.6.12~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3b09e68f81ea71521fba74e0d0a568f3437c93e;p=thirdparty%2Flibsolv.git do not ignore the result of solv_realloc when shrinking whatprovidesauxdata As we're always shrinking the code worked with glibc, but resulted in a segfault under valgrind. --- diff --git a/src/pool.c b/src/pool.c index f78f71ad..0f95b332 100644 --- a/src/pool.c +++ b/src/pool.c @@ -421,7 +421,7 @@ pool_shrink_whatprovidesaux(Pool *pool) *wp++ = id; } newoff = wp - pool->whatprovidesauxdata; - solv_realloc(pool->whatprovidesauxdata, newoff * sizeof(Id)); + pool->whatprovidesauxdata = solv_realloc(pool->whatprovidesauxdata, newoff * sizeof(Id)); POOL_DEBUG(SOLV_DEBUG_STATS, "shrunk whatprovidesauxdata from %d to %d\n", pool->whatprovidesauxdataoff, newoff); pool->whatprovidesauxdataoff = newoff; }