]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
do not ignore the result of solv_realloc when shrinking whatprovidesauxdata
authorMichael Schroeder <mls@suse.de>
Wed, 15 Jul 2015 09:47:54 +0000 (11:47 +0200)
committerMichael Schroeder <mls@suse.de>
Wed, 15 Jul 2015 09:47:54 +0000 (11:47 +0200)
As we're always shrinking the code worked with glibc, but resulted
in a segfault under valgrind.

src/pool.c

index f78f71ad4892b51627deb0aac8885a1e109d8608..0f95b3322e8a5c47cb52fe26f4edc117594fe676 100644 (file)
@@ -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;
 }